|
|
bloodsucker
Legendary Hero
|
posted December 21, 2014 04:18 PM |
|
|
Salamandre said:
bloodsucker said: This is from the script 33 to build the Gold Reserve
!!CA-1:B3/12;
!!CA-1&-1:B3/13;
In fact, from script strict reading he is not building neither city hall or capitol. The B3 command is only asking if city hall is built. If it is , flag 1 will be set to true.
So the translation of next:
!!CA-1&-1:B3/13
if the city hall wasn't build (flag 1 is false -1) check if capitol is built. Again flag one will store the result. This is indirect check.
Thanks
To sum: if the Capitol is built !!CA-1:B3/12; will return False (?) so if it returns False he checks for it after checking for City Hall. And you find funny someone can't understand it? It's ilogic, Capitol requires City Hall to be built so first line should (and probably does) return True in case Capitol is built.
But I was again looking at things the wrong way. Until now I only managed to use tinny peaces of other people's code, when I want something more complex the better way to go is to make a diagram of what I need and then find ways to fill the lines with code.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted December 21, 2014 04:55 PM |
|
|
I don't know that script, but my guess is that Fnord is aware about some parameters the manual does not specify.
____________
Era II mods and utilities
|
|
bloodsucker
Legendary Hero
|
posted December 21, 2014 11:21 PM |
|
|
Salamandre said: I don't know that script, but my guess is that Fnord is aware about some parameters the manual does not specify.
I found out that some buildings that could be overlaped would in fact return False in that case, in the past but then someone corrected it.
|
|
hcl
Adventuring Hero
|
posted December 22, 2014 04:57 PM |
|
|
Logical Operators and BOFH writing Manuals
maybe it can save some poor noobie some time:
when you want to combine multiple logical condidtions aka AND's and OR's
eg: !!VR&v1=5|y2=0|y3>=5:S ..
you HAVE to use the "/" for any subsequent statement after the first occurence of an AND or OR.
so above example wont work. But
!!VR&v1=5|y2=0/y3>=5:S ..
works.
its nowhere stated in the manual, just:
Use / to indicate the same operator as previously used.
No word about that you MUST use that instead of "&" or "|" when you want to use them in a row.
thx to that BOFH who forgot to mention that
|
|
mister_kalu
Known Hero
|
posted December 25, 2014 06:00 PM |
|
|
Salamandre said: I don't know that script, but my guess is that Fnord is aware about some parameters the manual does not specify.
salamandre do you have the plugin: "granite.era" and the partcher_x86.dll for the dig function?
thanks and merry christmas
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted December 25, 2014 08:25 PM |
|
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted December 31, 2014 03:59 PM |
|
|
patcher_x86.dll is included in era 2.46
|
|
hcl
Adventuring Hero
|
posted January 02, 2015 04:38 PM |
|
|
question about timer/timed events
i want to have a timer, that acts e.g every day -so far so easy.
But, i want to trigger the event after all other timed events for that day are done. How do i guarantee that all other timers from other scripts are done before "my" timer acts?
|
|
Mister_kalu
Known Hero
|
posted January 02, 2015 04:54 PM |
|
|
there are an era trigger with the function: before quit game ( to main menu)?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 02, 2015 05:08 PM |
|
|
hcl
!?TM3;
!!IF:M^3^;
!?TM2;
!!IF:M^2^;
!?TM1;
!!IF:M^1^;
You will see 1, 2, 3. Higher timer is the last (1-99)
kalu
After saving the game (only)
!?FU77008;
____________
Era II mods and utilities
|
|
OxFEA
Promising
Famous Hero
feanor on DF2.ru
|
posted January 02, 2015 10:03 PM |
|
|
Mister_kalu said: there are an era trigger with the function: before quit game ( to main menu)?
at 2.5+
|
|
hcl
Adventuring Hero
|
posted January 03, 2015 12:32 AM |
|
|
Salamandre said: hcl
You will see 1, 2, 3. Higher timer is the last (1-99)
thx!
|
|
chelseaperfect
Hired Hero
|
posted January 04, 2015 05:02 PM |
|
|
Please help me :'(
How do AI stronger every time? I want AI +25% att and def per month, HP +5% per week, ammo +1 per week, +2 damge (min & max) per week and +1 speed every 3 month. I don't know creat this ERM (
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 04, 2015 06:02 PM |
|
|
This is not one line script, you can find how is done in TEW4 map. Basically you need to read all !!MA receivers, do a loop through all creatures then apply your values.
However this is quite confuse the way you present it, as you want to be available only for AI, but AI can also have your creatures type, so then you have to do changes only during the battle, which is way more complex.
And of course, the +2 damage weekly is absolute wrong, just think at low levels creatures growth, in 4 weeks halberdiers will do monks damage, while champions still far away from Archangels damage. Then you have creatures with very low stats, so the +%5 will do no effect, thus you have to set to a minimum of 1.
|
|
chelseaperfect
Hired Hero
|
posted January 04, 2015 06:23 PM |
|
|
Not simple
I will probably take more time to study it . Maybe I will need your help in the future.
|
|
hcl
Adventuring Hero
|
posted January 04, 2015 08:47 PM |
|
Edited by hcl at 21:34, 04 Jan 2015.
|
What is the maximum number of creatures a creature stack [on adventure map] can have?
(somehow i have the feeling that the script that loops through all monsters on map gets a buffer overflow in some variables when trying to put each stack above a certain number.
at least setting stacksize via !!MOv1/v2/v3:Gn; doesnt seem to be as easy as it looks like. i get really weird numbers as result when trying high values eg: n=7000 rsults in 2900 creatures /stack
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 04, 2015 09:36 PM |
|
|
max size with MO:G is 4000, same as in editor. After that, you have to work around to set bigger stacks.
____________
Era II mods and utilities
|
|
hcl
Adventuring Hero
|
posted January 04, 2015 10:21 PM |
|
|
Salamandre said: max size with MO:G is 4000, same as in editor.
would be nice if someone puts that into the ERM html doku.
Salamandre said:
After that, you have to work around to set bigger stacks.
feel free to continue :)
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted January 05, 2015 03:52 PM |
|
|
well, you can find examples of this in dragon slaughter mod (tds) or conquistador. Basically what you need to loop through neutral monsters every week, add a virtual number to them then store this number in the square value (!!POv1/v2/v3:B0/#) where # is my custom number.
So lets say several months passed and you want this stack to have 21000 creatures. When battle occurs:
!?BA0&1000;
[check battle position]
[check the type of the object at this position]
[continue if 54 (monster]
[read the PO:B0/?y1 value]
[divide this value by 7 to get each stack value]
[set each stack to this value (will be 3000 in this case) with !!BA:M receiver-not sure I am not at home so no access to manual, you check]
|
|
Mister_kalu
Known Hero
|
posted January 05, 2015 04:49 PM |
|
|
Salamandre, do you have the script to remove an object from the map, but not instantly. like a normal vanish when you pick some item, that means gradually
|
|
|