|
|
bloodsucker
Legendary Hero
|
posted October 04, 2014 07:56 PM |
|
|
Salamandre said: Paste here what erm help says about w vars (hero vars) then ask me what section you don't understand.
Well, I don't understand how do I delete my mistakes.
Don't have a clue about how it happens but my new mod crashes even if I completly remove the verification code and restart computer. Don't get where is the variable stored but it has to be in a database I need to access cause I already assigned about 20 variables while testing. And for my bad I have to go now and will only be able to continue testing in a couple of hours...
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted October 04, 2014 08:00 PM |
|
|
Well, first do you use Erm scripter to make your codes or a simple notepad? Because the later will most likely screw.
Then it is a machine code, not human brain. A single typo and is over, can't adjust corrections like we do. Then you must read erm help explaining what is what, because I have no better explanations. Then, Siegfried showed how you create a debug message, after each code line, so you get where it stops.
Then by just reporting "isn't working and I don't know why", I am not Nostradamus and can't guess where is your error.
Nobody can.
____________
Era II mods and utilities
|
|
bloodsucker
Legendary Hero
|
posted October 04, 2014 08:23 PM |
|
|
Salamandre said: Well, first do you use Erm scripter to make your codes or a simple notepad? Because the later will most likely screw.
Then it is a machine code, not human brain. A single typo and is over, can't adjust corrections like we do. Then you must read erm help explaining what is what, because I have no better explanations. Then, Siegfried showed how you create a debug message, after each code line, so you get where it stops.
Then by just reporting "isn't working and I don't know why", I am not Nostradamus and can't guess where is your error.
Nobody can.
I know what I did wrong, we can't change the name of the mods or use the same w vars by mistake cause they are stored.
I was getting an error on the mod you helped me to code cause I changed his name, I changed it back and the error doesn't occur any more.
The new error is because w98 var should have already been chosen but is not in the list of claimed (wander why?). Now, even if I assign new variables or simply delete the verification code from the new mod the error still happens. Cause the value has to be w var name has to be stored in a database somewhere, but this I have no idea how it is functioning...
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted October 04, 2014 08:35 PM |
|
|
Vars values are stored in saved game. Era uses mods pattern so you should make a mod, enable it, test it in a map with erm scripter open, modify things then press F11 to refresh scripts, each time you change something.
w97 isn't claimed because...I choose it for you, when making your script. So naturally I choose one which is not used by other mods. Why would you want it to be claimed? Claimed means: used by other mods.
____________
Era II mods and utilities
|
|
bloodsucker
Legendary Hero
|
posted October 04, 2014 08:57 PM |
|
|
Salamandre said: Vars values are stored in saved game. Era uses mods pattern so you should make a mod, enable it, test it in a map with erm scripter open, modify things then press F11 to refresh scripts, each time you change something.
w97 isn't claimed because...I choose it for you, when making your script. So naturally I choose one which is not used by other mods. Why would you want it to be claimed? Claimed means: used by other mods.
Sorry, you don't understood me. I know w97 wasn't claimed, it is now - by you. What I didn't new was that if I changed the name of the mod where it was claimed it would still be claimed by the (now inexistant) mod. That's why w97 started giving me an error (in another mod, with the same code). When I reversed this error stoped.
On the other hand, I made another mod and that one used a variable that was probably already claimed cause I have the same error from the beginning. That didn't stoped even after I deleted all the code I copy from you to make the verification.
P.S. Whatever, everything is working now but I had to create another mod with other name but basicaly the same code to surround the problem with the wrongly assigned w var.
Is the Fred's Object Patch safe or I will have problems with different editors and map versions? I'm running out of objects for my functions...
Is there a maximum number of mods you can have active at the same time?
|
|
Siegfried
Famous Hero
|
posted October 05, 2014 09:59 AM |
|
|
Hi,
well, it is quite often that i do not know what a specific variable is for. I know that there are hero variables. But which script uses a specific hero variable for what purpose? It is documented nowhere. So often different scripts use different variables for the same purpose.
For example: There is a script giving some experience if the hero lets a stack flee. Is it somewhere stored how often he did this? If yes, i could build a kind of reputation system on top of it.
If we had such a documentation it would be possible to reuse those variables.
For functions it is quite similar. There are tons of functions out there. And probably many of them have their doublettes in some other script. It would be nice to have those functions documented so they might be reused in other scripts. Up to now each new script is somewhat inventing the wheel again
____________
|
|
Siegfried
Famous Hero
|
posted October 05, 2014 10:28 AM |
|
|
bloodsucker said:
Is the Fred's Object Patch safe or I will have problems with different editors and map versions? I'm running out of objects for my functions...
I think the Freds object patch is more than safe. It corrects a flaw in the object numbering. Some of the terrain overlays originally all had the same object subtype. So it was impossible to place them with erm except the first one. The patch should contain a renumbering to enable placing all of them explicitly with erm.
I use that in a script to let a hero place such a terrain overlay after a won battle, if the hero hat the appropriate skills. F.ex. for a cleric: If he has wisdom and water magic, he creates a small patch of holy ground after a won battle. For an inferno hero: If he has sorcery and fire magic, he creates a small patch of fiery plains after a won battle. Things like that. What i've not currently figured out: A hero should be able to remove an opposite type of terrain oferlay. I have not yet figured out how to do that. I think i have to find the left lower edge, but how to find that, if there are several overlays of same type?
____________
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted October 05, 2014 02:32 PM |
|
|
Siegfried,
As Bersy said, claimed vars/functions list in erm help is correct. They do not consider the recent era mods, because it would be insane work to keep track of all that, but:
*big era mods are standalone, you can't play them with wogification
*small era mods use (almost all of them) SN:W vars so there is no danger of duplicate
*Total Commander tool can find in one click where a var is located and if duplicated, I use it all the time.
*Era has increased range of free functions, up to billions, the chance of using twice a function is like wining the jackpot in Las Vegas now.
Naturally, it would be a lovely world where someone could update daily the claimed list, but this is tedious and long work and the few modders available have better to do.
|
|
bloodsucker
Legendary Hero
|
posted October 05, 2014 05:04 PM |
|
|
I've been trying to do this since yesterday, I've spent hours but I couldn't figure it out. I need to test what class is an hero so I can give expert necro only to the necro people. Last attempt was converting everyone to Clerics...
!!HE-1:B2/v1;
!!IF:M^%v1^;
!!if v1=8 :;
!!HE-1:S12/3;
!!HE-1:S21/3;
!!HE-1:A1/70/6 A1/130/1;
!!HE-1:C0/4/154/3 C0/5/63/20 CO/6/64/32;
!!el:;
!!if v1=9 :;
!!HE-1:S12/3;
!!HE-1:S21/3;
!!HE-1:A1/70/6 A1/130/1;
!!HE-1:C0/4/154/3 C0/5/63/20 CO/6/64/32;
!!el:;
!!HE-1:S21/3;
!!HE-1:A1/70/6 A1/98/8;
!!HE-1:C0/5/136/12 C0/6/87/16;
!!en:;
!!en:;
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted October 05, 2014 06:02 PM |
|
|
Try first simple operations, your overall syntax is wrong.
For example, from erm help:
B2/$ Set/get the class of a hero.
$ is a class (0...17, see Format HC)
Set and Get have different syntax. If you want to get a hero class:
!!HE-1:B2/?v1; [ask for hero class then store it in v1]
If you want to set:
!!HE-1:B2/v1; [set hero class to v1 value]
see the difference?
Then you write:
!!if v1=8:;
You leave a space between "if" and "v1" and believe the holy spirit will fill it with the right syntax? :)
The correct script is:
!!if&v1=8:; if v1=8 (& is condition)
|
|
fred79
Disgraceful
Undefeatable Hero
|
posted October 05, 2014 06:28 PM |
|
|
Siegfried said:
bloodsucker said:
Is the Fred's Object Patch safe or I will have problems with different editors and map versions? I'm running out of objects for my functions...
I think the Freds object patch is more than safe. It corrects a flaw in the object numbering. Some of the terrain overlays originally all had the same object subtype. So it was impossible to place them with erm except the first one. The patch should contain a renumbering to enable placing all of them explicitly with erm.
@ bloodsucker: as siegfried said, there isn't any reason why my patch would be anything other than safe.
@ siegfried: when you say my patch corrects a flaw in object numbering/terrain overlays originally all had the same subject type/impossible to place them with erm except the same object subtype/patch should contain a renumbering to enable placing with erm, what did you mean? i'm not understanding. is there something i need to fix in my patch?
|
|
bloodsucker
Legendary Hero
|
posted October 05, 2014 07:01 PM |
|
|
fred79 said: there isn't any reason why my patch would be anything other than safe.
When I mix with certain objects I often get errors addressing memory and that sometimes crashes the editor. I remembered something of the kind to happen but I didn't remembered with wich add-ons.
It still happens with both your mod and Salamandre's one.
It usually gives me the option to save first or has a recovering file but it still stress me a bit.
Salamandre
Thank you. It worked.
|
|
Siegfried
Famous Hero
|
posted October 06, 2014 06:40 AM |
|
|
fred79 said:
@ siegfried: when you say my patch corrects a flaw in object numbering/terrain overlays originally all had the same subject type/impossible to place them with erm except the same object subtype/patch should contain a renumbering to enable placing with erm, what did you mean? i'm not understanding. is there something i need to fix in my patch?
There is nothing wrong with it. You remember, when you started with your objects, i did the renumbering, and as far as i know you included it. At that point i corrected the subtypes for the original terrain overlays too. So i think it is included in your mod. I have not tested it recently though.
Originally it was only possible to place the first overlay object of a given type, because they all had the subtype 0.
____________
|
|
bloodsucker
Legendary Hero
|
posted October 06, 2014 04:50 PM |
|
|
In TDS there is an option to remove the 4000 limit to neutral units growth. I always tought this to be an extremely elaborated code but for sure is just an instruction, maybe a UN:C one, but I did understood what it was.
Does any one knows it and why it exists?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted October 06, 2014 05:32 PM |
|
|
TDS does not remove the 4000 stack limit. yet it gives this explanation, because the proper one would sound too complicate for the player and he does not need to know the ingredients used, but just taste the result.
TDS adds to existing 4000 stack a virtual number each week, and the result is stored in PO settings (square). When player engage the battle with such stack, in BA receiver the monsters number is borrowed from PO and updated.
|
|
bloodsucker
Legendary Hero
|
posted October 06, 2014 05:40 PM |
|
|
Think I got it, sounds a bit to complex to try. Now I know why didn't saw it in so many other maps...
Thank you.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted October 06, 2014 05:45 PM |
|
|
No, is easy to do, a few lines.
Most maps don't use it because there is no need. When one wants to create overpowered battles, you can raise the creatures stats instead of raw numbers. But TDS is particular mod, they play it with billion of ghosts etc.
Looks like for Chineses, the high numbers are some virile argument.
____________
Era II mods and utilities
|
|
bloodsucker
Legendary Hero
|
posted October 07, 2014 02:06 AM |
|
|
Salamandre said: No, is easy to do, a few lines.
Most maps don't use it because there is no need. When one wants to create overpowered battles, you can raise the creatures stats instead of raw numbers. But TDS is particular mod, they play it with billion of ghosts etc.
Looks like for Chineses, the high numbers are some virile argument.
The thing is: I'm starting a cenario with a x5 growth factor from Conquistador. I look and see a group of 510 dwarves, other of 455 mummies, etc... If I understood it right, next week they will be around 2500. On the third week, on the other hand, they will be 4000 and they will be 4000 until the day they are defeated. So it starts incredebly hard but then after week three difficulty stays the same until the end of the game. Plus, I altered the Random Hero probability to 50% and play with AI creatures always ace so most of them will be at level 10 when I'll faced, be it first combat or month twelve... Now, one can increment the stats of a single battle or play with the "Neutral Creatures get Bonus" but in the and it all resumes to this: you can make a very hard start but if u survive things will start to be easier with time. That's where ilimited growth could do something, or maybe not.
If it's so easy can u show me how to do it?
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted October 07, 2014 08:27 AM |
|
|
Yeah, I didn't add this 4000+ in conquistador because if you use a rich monster template, you will get enough battles to stay within the safe experience levels limits.
Look at TDS, you may break the game, with the battles it proposes. Endless times I found myself level 108 at middle game and had to open erm scripter and revert my levels. But a common player can't do that so game is broken for him.
The x5 growth option is already insane and should be used only with special boost mods, as pillars. + enhanced commanders. Having only 500 creatures stacks everywhere on day 8 is not easy.
But back to your script, it is TDS/s/enhanced monster.erm. Look at function FU5402, called weekly by Timer 94. Is a bit long script as there are many checks and situations to imagine (what if player is defeated by stack, set stack back to 4000+, etc) but the commands used are simple. Woodmelon checks monsters level then add to PO:V (square value) a virtual growth. When battle starts:
!?OB54&1000; visit monster
!!PO998:V1/?v1053; [read PO:V value then store in v1053]
He read the virtual value in PO:V (v1053) then set a flag to true (V527/1). Then in battle, if this flag is true, he adds to each battle stack the virtual value.
!?FU5403;
!!BMx16:T?y1 N?y2; checks stack number (will be a max of 4000)
[...]
!!BMx16&x1=1:Ndv1053; add v1053 to this 4000 limit
|
|
bloodsucker
Legendary Hero
|
posted October 07, 2014 11:54 AM |
|
|
Salamandre
The only way I know to stop a function is by calling another function, something like:
!!FU12222;
Blah, blah blah;
!!FU4567;
Now, I add those lines to make the creatures neutral to my Hello World.
It goes like this:
ZVSE
!?PI;
!!DO12345678/0/196/1;
!?FU12345678;
!!MAx16/-1;
!!HE109:Fd2/d2/d2/d2;
!!HE109:C0/0/136/8/50000/2 C0/1/37/12/50000/2 C0/2/37/12/50000/2 C0/3/150/4/50000/2 C0/4/37/12/50000/2 C0/5/37/12/50000/2 C0/6/136/8/50000/2;
!!HE109:S0/1 S2/3 S7/2 S11/1 S15/1 S16/1 S17/3 S18/1 S19/1 S21/3 S22/3 S23/2;
!!HE109:A1/98/8 A1/70/6 A1/58/1 A1/64/10 A1/125/11 A1/126/12 A1/96/20 A1/156/21 A1/156/22 A1/156/23 A1/156/24 A1/156/25 A1/156/26 A1/156/27 A1/140/28;
!!HE109:Id110;
!!HE109:W25000;
!!OW:R-1/0/d15;
!!OW:R-1/1/d10;
!!OW:R-1/2/d15;
!!OW:R-1/3/d10;
!!OW:R-1/4/d10;
!!OW:R-1/5/d70;
!!OW:R-1/6/d15000;
!!OW:R-1/7/d120;
First I wasn't understanding why my hero had just 0011 prims and I had so many resources but now I'm sure is because everything is repeated 196 times...
Is it a better politic to make a function for each set of instruction in a basic script like this?
|
|
|