View Full Version : [MOD] SD StackXP


Stone-D
Dec 11, 2005, 12:44 AM
(Also posted on Apolyton)

I found myself micromanaging unit stacks. I'd monitor who's got the least experience and try to focus on that unit in combat. Sometimes I would forfeit a higher level unit's combat round so that he wouldn't get too far ahead with XP.

This mod does away with that. At the end of a combat round, one point of the winner's experience level is given to a unit in the stack with the lowest experience.

Note that some battles will be a bit harder as a result of this.


History
=-=-=-=

v1.00 :
Initial Release.

v1.10 :
Requires sdToolKit 1.20+
Implemented version control.
Distributes all of a unit's NEW experience evenly throughout the lesser members of the battlegroup.
Siege weapons have been excluded.

v1.20 :
BugFix : Occasional loss of 1 XP.
Some minor cleanups and optimizations.

Mylon
Dec 11, 2005, 07:50 AM
Makes sense. I hate how if I just throw a stack of troops at another stack of troops my most experience soldiers will fight first (and most likely die), which means I don't have those elite troops around when I need them.

Exel
Dec 11, 2005, 07:54 AM
Makes sense. I hate how if I just throw a stack of troops at another stack of troops my most experience soldiers will fight first (and most likely die), which means I don't have those elite troops around when I need them.

That's why I don't use stack attack but manage my units individually. :p

Stone-D
Dec 11, 2005, 09:04 AM
Mylon: Yup. I'm debugging a newer version that stores the pre-battle XP so I can get the difference, which is then distributed.

Exel: Guess what drove me to make this! :P

Remember the manual. Stack attack is for the player's convenience... it doesn't modify how the combat calculations are done at all. The micromanagement kinda removed that convenience for me.

low
Dec 11, 2005, 09:10 AM
Nice Stone-D. Downloading now. :goodjob:

Impaler[WrG]
Dec 11, 2005, 09:14 AM
I think he is complaining more about the fact that stack attack attacks stupidly, throwing away the best units in "Picketts Charge" rather then softening up with the weaker ones first. Ofcorse on the other hand in an easy battle you might want to veterans to desisivly crush your oponent rather then risk the loss of the green troops. Theirs realy a lot to consider. What we need is two kinds of stack attack Weak>Strong and Strong>Weak.

Dom Pedro II
Dec 11, 2005, 09:20 AM
What you need to do is stop using stack attack ;)

Stone-D
Dec 11, 2005, 11:42 AM
Just uploaded version 1.1. See the first post for details.

Houman
Apr 27, 2006, 08:57 AM
Is this compatible to 1.61 patch? :)

TheLopez
Apr 27, 2006, 09:09 AM
I don't see anything in the code that wouldn't make it compatible. Houman, since I'm at work, could you test it and let me know if it isn't. If it isn't then I'm take the responsibility and update it.

Houman
Apr 28, 2006, 10:01 AM
Thanks Lopez, I will test it. :) I am just downloading the updates of all components we have in our mod before we start integrating. So I thought I ask first. hehe ;)

Houman
Apr 28, 2006, 05:08 PM
@Lopez,

Do you think SD-UTILITY-PACK is neccessary at all?

import sdToolKit
sdEcho = sdToolKit.sdEcho

Looks to me as it does nothing...

thanks
Houman

TheLopez
Apr 28, 2006, 05:43 PM
Yes, it looks like it is needed since it is used in sdStackXP.py

Houman
Apr 29, 2006, 03:51 AM
@Lopez,

Yeah you are right, it is needed in sdStackXP.py. However why is it also in the Eventmanager:

import sdToolKit
sdEcho = sdToolKit.sdEcho

And it is not used there at all? Is it not enough to import it only within sdStackXP.py?

Thanks
Houman

TheLopez
Apr 29, 2006, 07:50 AM
You are correct, it is not needed in the event manager from what I can tell. So you should be able to remove it from there...

Houman
Apr 29, 2006, 03:45 PM
Thanks, it is good to keep the code clean. ;)