|
Thread: Several questions about what I can and canīt do with Era | This thread is pages long: 1 2 3 · «PREV / NEXT» |
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted September 17, 2016 04:17 PM |
|
|
Well, the only games where you can control dead heroes are the Zombies games. Not so heroes style.
____________
Era II mods and utilities
|
|
Pollo2002
Famous Hero
|
posted September 17, 2016 07:49 PM |
|
|
Heroes actually canīt die So No dead heroes ever exist.
____________
|
|
Pollo2002
Famous Hero
|
posted September 18, 2016 09:12 AM |
|
|
Ive learn that changing spell power of a hero during a battle doesnt affect spells.
I was trying to change the duration of spells based on spellpower in another way than a 1-1 ratio.
Is there an easy way to do it? i can accep tmaybe some moment before the battle start to change the spell power of the heroes to match the duration of spells i want.
I know the other solution is to check the stack of creatures that just recieved the spells and change the duration of the spell. (which can be a pain to do in the case of mass spells)
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted September 18, 2016 09:52 AM |
|
|
Erm is not a miracle, it can work with the existing mechanics, and of course you can change the spell power OR effect, is specified in manual then I used it intensively to change many things to spells in tew 4. Also I don't see why is a pain to check if mass spells, we have !!DO loop, for that. Is fast and effective.
You can try in BG0, check if hero cast spell, check the spell, put a flag if spell is cast, then in BG1 (after action), check if flag is true, continue if yes, loop all creatures, check if they have the spell applied, in case of immunities, and change the duration of the spell.
|
|
Pollo2002
Famous Hero
|
posted September 18, 2016 05:11 PM |
|
|
Yes with the !!SS reciever you can do many things, I figured that out, I just couldnīt figure out an easy way to change buff/debuff durations. At least that is as simple as changing other things, but ok it seems the only way is to do it the long route.
|
|
Pollo2002
Famous Hero
|
posted September 18, 2016 07:11 PM |
|
|
I'm right now working on my "one spell per combat script"
Removing the spells once they are cast is super easy (done in 3 lines).
The hard part is storing the spells and restoring them at the end of combat.
This is the only way I come with and seems very complicated.
I assign to every spell a FLAG for each of both heroes. (like V100 is for stoneskin for attacking player)
Every time you cast a different numbered spell, that spell set that Flag to true (in addition to dissapearing from the playe spellbook)
When battle ends, check for each hero what flags are true and add to their spellbooks each spell with a TRUE Flag.
That's what im planning to do for now. Is there any simpler/cleaner way to do it?
EDIT: The other way i thought about but not much simpler is at the start of the battle use !!HE:M to get every spell in the spellbook one by one and doing this 68 times for each variable and store it on 68 variables, and at end of combat add the 68 spells stored.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted September 18, 2016 07:35 PM |
|
|
Storing the spells Orrin (ID=0) has:
!?BA0;
[...check heroes...]
!!DO12345/0/69/1:P0;
!?FU12345;
;x1 hero ID
!!HEx1:Mx16/?y1; y=1 he has the spell
!!FU&y1<1:E; exit if he does not have this spell
!!SN:W^Pollo_Hero_%X1_%X16^/1; store this spell in SN W var
Restoring Spells after battle:
!?BA1;
!!DO54321/0/69/1:P0;
!?FU54321;
;x1 hero ID
!!SN:W^Pollo_Hero_%X1_%X16^/?y1;
!!HEx1&y1>0:Mx16/1; give back spell
See? easy.
|
|
Pollo2002
Famous Hero
|
posted September 18, 2016 07:42 PM |
|
|
First thanks a lot for your help, that looks very elegant, though I didnīt figure it out yet.
Second, thanks to this I just figure out !!SN has a purpose! LOL, I always ignored that reciever because itīs called sound support and i have no interest in messing with sound, I was dazzled that you would change sound so where to the erm help to find out that functionality has been improved to more stuff. So that's intersting!
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted September 18, 2016 07:46 PM |
|
|
SN w is very powerful, just make your own SN w templates, usually with your name in, so it can't conflict with other scripts. This way you can store endless things, and safely.
|
|
Pollo2002
Famous Hero
|
posted September 18, 2016 08:02 PM |
|
|
Wow thanks a lot it works excellent now, tested in several ways wtih no problem, you saved me a lot of time, donīt you have a donation box?
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted September 18, 2016 08:21 PM |
|
|
All the fame and rewards should go to the one who made both Era and SN w vars possible, Bersy. I only apply the rules.
____________
Era II mods and utilities
|
|
Pollo2002
Famous Hero
|
posted September 19, 2016 02:47 AM |
|
|
Is there any quickway to change the % of movement terrains require?
____________
|
|
Pollo2002
Famous Hero
|
posted September 19, 2016 06:23 PM |
|
|
I want to create the mod to download but not sure how to do with era, I change a lot of the TXT files, that i just put on the WOG Data folder, what happens if i put it on my mod/pollomod/data folder? how i make them take priority over those in WOG? Also for now i can put the scripts on my map but i want to make the scripts in random maps, by just placing ERM files in the data/s folder is enough? or do i have to enable somehow?
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted September 19, 2016 07:02 PM |
|
|
Terrains movement: ask /IM Oxfea, he has the addresses.
Mod: never change anything else in other mods. Make
Pollo mod/data/s then you put here the scripts. The text files you can either put in your mod data folder, or create a pac (ancient lod) and put them inside, both work.
Additional folders (maps/sounds etc) in your Pollo main folder. Will have priority on any other mod which is activated below.
This way, when someone wants to play your mod, it clicks and activates it, then deactivates later and no changes to his game.
|
|
Pollo2002
Famous Hero
|
posted September 20, 2016 05:47 PM |
|
|
This is the script im running
For some reasons, SOMETIMES not always i get an error that HE canīt find hero, when I attack neutrals.
As you see I do a check for that, first just in case i set the variable 790 to -1, which i use later as a check.
Basically it shouldnīt run the !!HE-20 line unless there is a hero, yet somehow it runs when there is a hero. I check on the log and for some reason BH1 sometimes return a result of a hero the computer has, even when in the battle there is no hero, I donīt get it.
ZVSE
!?BG0;
!!BG:A?y1 S?y2;
!!HE-1&y1=1/y2<>15:My2/0;
!?BA0&1000;
!!VRv790:-1; Reset variable 790
!!BH1:N?v790; Ask what hero is sitting to the right if any
!!HE-10:N?v755;
!!HE-20&v790<>-1:N?v756; if any hero is present at the right side, ask which hero it is.
!!DO12345/0/69/1:Pv755;
!!DO12345/0/69/1&v756<>-1:Pv756;
!?FU12345;
;x1 hero ID
!!HEx1:Mx16/?y1; y=1 he has the spell
!!FU&y1<1:E; exit if he does not have this spell
!!SN:W^Pollo_Hero_%X1_%X16^/1; store this spell in SN W var
Restoring Spells after battle:
!?BA53&v780=0;
!!DO54321/0/69/1:Pv755;
!!DO54321/0/69/1:Pv756;
!?FU54321;
;x1 hero ID
!!SN:W^Pollo_Hero_%X1_%X16^/?y1;
!!HEx1&y1>0:Mx16/1; give back spell
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted September 20, 2016 06:00 PM |
|
|
To be safe, always store both heroes in BA0 trigger, then when in BG, use the above vars. HE-1 is too vague for BG trigger, you should check BG:H first.
|
|
Pollo2002
Famous Hero
|
posted September 21, 2016 11:28 PM |
|
|
I decided to use this thread to deal with all my problems with ERM and giving that they are going to be abundant since im doing a lot of work. But if desire i can start doing it on the sticked ERM HELP thread.
Anyway, Iīve been breaking my head with this one
!?CM0;
!!IF:V10/0;
!!IF&-1000:V10/1; (check if it's AI)
!!CM&-10?v4/?v5/?v6; (Get location)
!!VRy52&-10:S-1; (assume no hero)
!!OW&-10:A-1/?y52; (get current Hero)
!!IF&-10/y52<0:V10/1; (abort if no current hero)
!!OBv4/v5/v6&-10:T?y55;
!!IF&-10/y55<>34:V10/1;(abort if not hero)
!!IF:M^%V4 %V5 %V6 %Y55 %Vf10^;
!!IF&-10:M^So far so good%V4^;
it doesnt matter the rest of the script because here is the problem.
This is my show gold of army script. Ive trying to debug why it sometimes work and sometimes it doesnt and it all lies on the !!OB reciever line.
As you see Ive set two IF command to let me see what the variables are doing. And here is what i found. the !!OB reciever is inconsistent on what finds on the exact same coordinates.
The v4 v5 v6 coordinates are ALWAYS correct, the problem is that the y55 where i Keep track of what object is on those coordinates itīs not.
Sometimes it finds the object itīs there, sometimes it finds none, and surprisingly it depends on the most bizarre things.
I try to find if a hero is there.
If I have a castle selected, it finds nothing, y55 becomes 0.
If I have a hero selected, it canīt find itself UNLESS I move the vision of the map. Say i click on the minimap, then I check the hero, it finds the hero!. Bit if i choose the hero, and try to find it, it doesnt. it returns 0.
If I choose a hero and right click on other heroes they find it, they just canīt find themselves.
I donīt get it Iīm completly lost.
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted September 22, 2016 02:09 AM |
|
|
It would be easier if you describe what exactly you want your script to do. For instance, you don't need to check if AI or human when CM0 because this is click trigger. AI doesn't click yet, maybe they will improve it one day and will even drink a coffee but for now not :)
So this already eliminates a lot of unnecessary checks in your script, so others can read it better. Also, hero as object is never recognized, ID 34 I mean. To find if there is a hero at location xyz, you must ask his ID then store error message in flag.
!?CM0;
!!CM:P?v1/?v2/?v3;
!!UN:P904/1; turn errors off
!!UN:P905/0; clear error flag
!!HEv1/v2/v3:N?y1; get hero to y1
!!UN:P904/0; turn on errors showing
!!UN:P905/?y2; get error flag to y2
!!IF:L^%Y2^; y2=0 --> there is one hero there, y2=1--> no hero
Is preferable that you use ERM thread for erm scripts, because then is easier for us to search and link the solution when someone else asks for same problems.
|
|
Pollo2002
Famous Hero
|
posted September 27, 2016 01:17 AM |
|
|
1) Is there a way to add an arrow tower to forts or remove the moats from citadels?
2) Is there a way to change the damage moats do?
3) Is there a way to change the values in which each item appears on random map (I know I can just search X object and replace it with Y on !?PI; But i wonder if there is a more elegant way to do it?)
4) Is there a way to really force the RMG to not use portals? Iīm pretty sure this impossible, but who knows, better ask here than sorry
____________
|
|
Pollo2002
Famous Hero
|
posted September 27, 2016 04:42 AM |
|
|
Is it possible for potential joining monsters, to never offer to join for free but for gold?
____________
|
|
|