Current time: 12.03.2025, 00:45 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
Ошибки, баги и недочёты ERA
» crash logs / errors / bugs of era
Author Message
Archer30 Offline
Moderators

Posts: 1190
Post: #886

Berserker, I must correct myself - the issue I mentioned above is specifically for HE:C0 (use for army type/quantity management)

To add a certain number of troops, we usually just use HE:C2. This command is dedicated for army increase that we don't have to worry about which exact slot to add/whether all the slots are full.

That is to say, when we change the stack amount of a slot using HE:C0, we expect the stack exp to stay the same for each unit.

Quote:Another issue is backward compatibility.
This is also my main concern, and I believe changing the default behaviour of HE:C0 only makes many scripts work as the scripters intended. But I understand this can be debatable.

At this point, I will use regular expression to search for every HE:C0 instance in mods and see if they need a correction. If that's done, it's no longer required to change the current HE:C0, as we are not likely to have more wrong written HE:C0 scripts anyway.

Edit: It seems CA:M2 (troop management in towns) uses the same implementation as HE:C0 here; changing the stack number preserves the total exp instead of exp of each unit. Guess we just leave as it is.


Latest ERA mods and scripts in development - My GitHub
(This post was last modified: 02.03.2025 11:23 by Archer30.)
02.03.2025 09:32
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16730
Post: #887

Archer30, CA:M2:
Code:
case 2: // M2/pos/$/$ охрана замка тип и кол-во
f((Mp->n[1]<0)||(Mp->n[1]>6)){ MError("\"!!CA:M\"-position out of range (0...6)."); RETURN(0) }
Apply(&dp->GuardsT[Mp->n[1]],4,Mp,2);
Apply(&dp->GuardsN[Mp->n[1]],4,Mp,3);

As you see, WoG simply does not change total stack exp counter, thus xp per single creature is adjusted automatically via runtime calculations.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
06.03.2025 04:12
Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Forum Jump:

Powered by MyBB Copyright © 2002-2025 MyBB Group