Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
API Example script
Author Message
Nexistor Offline
Member
***

Posts: 53
Joined: May 2012
Post: #11
RE: API Example script
Can you write script that changes language?
26-12-2012 05:38 PM
 Search   Quote 
Peluski17 Offline
Member
***

Posts: 133
Joined: Nov 2012
Post: #12
RE: API Example script
The only thing that is not clear in my mind about the amazing script you are now working on is how you simulate battle with the previous simulation information instead of it reverting back to the actual combat information.
26-12-2012 08:43 PM
 Search   Quote 
Peluski17 Offline
Member
***

Posts: 133
Joined: Nov 2012
Post: #13
RE: API Example script
Ah I must have misread. So it shows different outcomes based on your unit formation based on the same base data, but this allows you to do side-by-side comparisons of what each unit formation will do? In this case, it doesn't do multiple round simulations.
26-12-2012 09:39 PM
 Search   Quote 
Topper42 Offline
Developer
***

Posts: 248
Joined: Dec 2011
Post: #14
RE: API Example script
(26-12-2012 09:39 PM)Peluski17 Wrote:  Ah I must have misread. So it shows different outcomes based on your unit formation based on the same base data, but this allows you to do side-by-side comparisons of what each unit formation will do? In this case, it doesn't do multiple round simulations.

Yes it's just comparison of different Unit formations. Multiple round Simulation is Not possibile with the API.
26-12-2012 10:15 PM
 Search   Quote 
Peluski17 Offline
Member
***

Posts: 133
Joined: Nov 2012
Post: #15
RE: API Example script
I'm going to have to practice making better menus like yours. Looks professional as it should be Wink
27-12-2012 03:30 AM
 Search   Quote 
eferz98 Offline
Posting Freak
*****

Posts: 3,069
Joined: Feb 2012
Post: #16
RE: API Example script
(23-12-2012 11:40 PM)Topper42 Wrote:  That's why i thought a script says more than thousand words ^^.

I tried and read the script and it has taught me quite a bit. Many thanks, Topper42. I noticed that the UI element to call up the "CityUpgradeWindow" seems to be partially hidden while using the Maelstrom Tools and completely obstructed if you have enough bases to fill right side column. Is there any way you can update it to give examples on how to avoid these particular circumstances?

[Image: 5Z2xY.jpg]

And for the rest of you, just in case you haven't bothered testing the script; this is what the rest of Topper42's example script looks like.

[Image: iUkXm.jpg]

[Image: I6Xeh.gif][Image: ho5UK.jpg]
27-12-2012 05:44 AM
 Search   Quote 
KRS_LAN Offline
Senior Member
****

Posts: 482
Joined: Apr 2012
Post: #17
RE: API Example script
(23-12-2012 11:26 PM)Deyhak Wrote:  The funniest thing is that nothing is here is anywhere near what we have been introduced to so far!

Incorrect Sir (or M'am). The funniest thing here is how the API Example script contains code to bypass obfuscation Big Grin

[Image: R68BbSE.jpg]
cncscripts.com
(This post was last modified: 27-12-2012 08:39 AM by KRS_LAN.)
27-12-2012 08:38 AM
 Visit this user's website   Search   Quote 
Topper42 Offline
Developer
***

Posts: 248
Joined: Dec 2011
Post: #18
RE: API Example script
(27-12-2012 08:38 AM)KRS_LAN Wrote:  
(23-12-2012 11:26 PM)Deyhak Wrote:  The funniest thing is that nothing is here is anywhere near what we have been introduced to so far!

Incorrect Sir (or M'am). The funniest thing here is how the API Example script contains code to bypass obfuscation Big Grin

I created the API after your requests and had never written any script by myself that uses it, therefore i never experienced the problems that you guys had. But i wanted to publish the script with full API support and not limit it to just simulate without stats. The good part is that i know now what else is needed in the API and i can add it.

I planning to create a thread where everybody can post their wished for the API. After that we gather the most wished functions and implement them.
27-12-2012 11:48 AM
 Search   Quote 
Topper42 Offline
Developer
***

Posts: 248
Joined: Dec 2011
Post: #19
RE: API Example script
@eferz98:

Yeah that is not so cool, but i can't possibily test my "Example" script with every other script that is around and this goes for the other script writers too.

The best ui independant solution would be to use a window like the "CombatWindow" for the buttons too, but this is even more terrible if all scripts do it Wink.

A better solution would be if the game itself provides a window, where every script can add its buttons and the game shows the button to open that window if any script added something to it. (I will keep this in mind and check if we could do something like that)
27-12-2012 11:52 AM
 Search   Quote 
Peluski17 Offline
Member
***

Posts: 133
Joined: Nov 2012
Post: #20
RE: API Example script
In your advanced script it showed that you were able to calculate possible loot or resources obtained from that simulation. Does this information come from the data after the simulation has finished or did you have to do something like get the combat report?
27-12-2012 03:10 PM
 Search   Quote 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)