Jump to content


Photo

feature request for heroes mod


82 replies to this topic

#1 Oranisagu

Oranisagu
  • New Members
  • 2 posts

Posted 10 April 2008 - 10:57 AM

Hi there

thanks for your great work and the fast release of the soulstorm ai.

I've waited to see if you might adress the following problem anyways, but looking at the code it doesn't seem so (no offense, it is a minor inconvenience and has nothing to do with the ai anyways):
- necron lord using his transformation abilities (death bringer/flyer form) loses all xp when reverting to normal (or more exactly, already during transformation resulting in a lvl 1 deathbringer. which probably isn't that bad, this form is nasty already - but when reverting he needs his former lvl back)
- sisters giant floating angel (don't know the english name of her) has the special to be reborn when dying. this also leads to an xp loss. ok, she's uber already but it would be more conform..
- commanders attached to squads lose all xp, don't level up anymore and when detached start at 1 (or up to 3, if theres another general of high enough lvl).. this is the most problematical thing, since some commanders are especially good if attached. my 'dream' solution: commander lvl and squad lvl separate. on attach, lvl difference will be noted. on detach, squadlvl+difference=commander lvl. say squad lvl 1 + commander lvl 4 together will lvl up until squad is lvl 4. then, commander detaches and has lvl 7.. obviously, this also can only work when the commander-unit is unique, not with missionarys or kroot sages (or whatever they're called in english), but it'd still be a great improvement.
EDIT: sorry, I was half-way wrong: commanders don't lose lvls it seems, but the don't lvl up either when the squad does.

I've never done any lua scripting, but tried to solve it by myself. came up with a possibility to keep track of those units xp (since they are all unique, the can be traced by name instead of unit-id), but resulted in them having their former lvl even when completely dead and being rebuilt. Didn't find any way to check if the angel-unit has used her special recently or if the necron lord has ben transformed (and if he has and died in the new form, what then?). so my attempt at patching came to an end, I believe it takes more knowledge of the scar functions than I can muster so far ;-)

It would be great, if you could solve this problem but I'd fully understand if you don't think it matters at all.

if not, I'll experiment a bit further on my own, even though I doubt I can come up with a viable solution, I just can't think of any way and can't seem to find the functions in the scar doc which would help.. (speaking of which: is there a newer reference including the ss functions?)

thanks for all your work and a very much improved gameplay experience!

Ora

Edited by Oranisagu, 10 April 2008 - 11:21 AM.


#2 Inquisitor

Inquisitor
  • Members
  • 121 posts
  • Location:Ordo Malleus

Posted 11 April 2008 - 06:59 PM

Thank you for spending time writing a helpful report of problems with the Heroes mod. :p

For your information, the Heroes mod was included in the Skirmish AI primarily to improve the AI at higher difficulties (instead of just giving them more HP and damage they would be veterans or better). :p
The Emperor knows, the Emperor is watching.
Want to zoom out further? Try this camera mod.

#3 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,166 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 11 April 2008 - 07:43 PM

@Oranisagu - quick answer is: its hardcoded - ie. when something attaches to a squad then unattaches it looses its XP. Thats hardcoded by Relic. Sorry.

As for the existence of HEROES - simple: to replicate Veterancy like other RTSes have BUT this time with a lot of better "leveling" features where scouts level up different than, say, commanders.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#4 Cultist

Cultist
  • Members
  • 34 posts
  • Location:Vienna, Austria

Posted 19 April 2008 - 03:29 PM

No it is possible!

I made some changes in the heroes_manager and it is working. I can upload it but i dont know how.

#5 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,166 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 19 April 2008 - 03:53 PM

What? :D

Send it to filefactory.com.. Cultist -- you a SCAR coder?
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#6 Cultist

Cultist
  • Members
  • 34 posts
  • Location:Vienna, Austria

Posted 19 April 2008 - 06:21 PM

Yes, I might have become a SCAR coder(didn't know SCAR means Scripting at Relic)

I was searching the Internet for a SS patch because the AI was really bad, especially the Dark Eldar. And finally i found your DC Skirmish Ai Mod and i found it great at least the Heroes Mod wasn't working properly and you guys were busy scripting for the SS Mod, so I started to experiment a bit.
I was scripting before but only at python, php, sql but never at LUA.

In the first place I want to say that there is one restriction: a squad with an attached unit put in a transport/building will still cause it to lose everything. Beside that everything else (as far as I tested) works fine, any attached unit will maintain its XP and transforming doesn't lead to a XP lost. Btw the Heavy Weapons Team doesn't lose its entry I only added the entrenched blueprint into the races file.

I also added a new experience system for the Bloodthirster, Harbringer Drones, Attack Scarabs and Fire Warrior Bodyguard.
Because it is impossible to get which Harbringer/Tomb Spyder spawns what I made the transfered XP depend on XP and unitcount, Fire Warrior Bodyguards will achieve their XP from the Ethereal. But for the Bloodthirster it is possible to determine which squad summones it anyway only the Chaos Sorcerer may summon a high level Bloodthirster.


Also note I set it to "Testmode" so there will be guard units spawned at startup (no training time and faster xp gain).
I marked these sections, you will have to delete them afterwards.

Heroes Mod for DC

I will upload a SS version too. :D

Edited by Cultist, 19 April 2008 - 10:40 PM.


#7 Cultist

Cultist
  • Members
  • 34 posts
  • Location:Vienna, Austria

Posted 19 April 2008 - 10:39 PM

Okay this is for SS now
Enjoy!

Heroes Mod for SS

#8 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,166 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 19 April 2008 - 10:43 PM

How did you manage what we thought was impossible to retain = keeping XP when attaching to squad, becoming the NB, garrison/ungarrisoning from transports? You obviously must have some serious coding experience to figure this out?
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#9 Cultist

Cultist
  • Members
  • 34 posts
  • Location:Vienna, Austria

Posted 19 April 2008 - 11:51 PM

I might have had nothing to do or I was quite bored waiting for your Mod. ;)

The solution for the XP transfer while transforming was quite simple. If a new unit is detected lets say the NB and the NL doesn't exist anymore so transfer the NL XP to NB and reverse. Also the function which deletes dead squads doesn't care about attached units so its table entry exists and i you can store its ID in the attached squad to identify it later. But only shortly I realized, now I'm very glad about it, detaching a squad creates a very unique situation, an attached squad isn't attached anymore but it also doesn't exist in the game + few more conditions and tada there it is.

garrison/ungarrisoning from transports


No, this ain't working!
Garrisoning an attached squad will end in the lost of its table entry, the squad may achieve lvUps if detached but further reattaching and detaching mixes up everything , the squad loses everything but the modifiers. :D

Oh! forgot to say the NB and Deceiver don't achieve health bonus they can't take damage anyway.

Edited by Cultist, 19 April 2008 - 11:54 PM.


#10 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,166 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 20 April 2008 - 12:42 AM

Arkhan would certainly be interested in this new coding development. :D Thanks Cultist!
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#11 Oranisagu

Oranisagu
  • New Members
  • 2 posts

Posted 21 April 2008 - 12:30 PM

sorry, for the late answer, I did some tests too.. but was way less successful than cultist (only necron lord worked.. partially) ;-)

thank you cultist, thats awesome, now the necron lord is usable again (he was always cool at lvl9 but without his morphes just half the fun)..
and the idea of lvl-heritage for harbinger drones and so is a cool idea.


I thought of something else which might or might not be an issue: the archon incubus behaviour. those were staying on lvl 1 all the time.. the archon gets stronger and stronger, and his incubi just... die around him *g* thats ok, in essence, for the archon (he still is a strong commander-unit, and the incubi let him lvl extremely fast), but I was thinking about it and I guess, lvlup only goes for the exact squad type, which means all reinforced units (by hitting the big fat +). but the archon incubus (and the IG addons) are not such reinforcements and as such are not affected... so this would also be true for every kind of squad leader.. even though it might not be as easy to find out (the impact of this problem, if it exists at all, cannot easily be seen, except when watching a squad very closely - in battle nearly impossible *g*).. sometimes, those leaders are quite important, i.e. for tau ghost (makes 1/4 of the whole squad and emp and most damage) or eldar guardsmen (sees infiltrated units so should not be killed easier than normal guardsmen *g*) and should lvl up like their fellow comrades..


ora

#12 Cultist

Cultist
  • Members
  • 34 posts
  • Location:Vienna, Austria

Posted 21 April 2008 - 04:33 PM

I've uplaoded an new version and I think it's the final one! ;) :p


Here's what I've changed:

1. I came to the conclusion I didn't consider what happens if a squad with a commander dies, this is fixed so never mind attaching FC to scouts.

2. garrison/ungarrisoning from transports works! Because the attached squad loses its modifiers you must detach it to reapply them, this works 1/2 automatically: you have to detach it, it will reattach on its own. This could be changed but I can't find a function which checks if a squad is in transport.

3. Now the Heavy Weapons Team can transfer the XP to its counterpart but to manage this the HWT must entrench (automatically) hence the next entrenched HWT is the one we are searching for.
This is because unlike the NL/NB both versions of the HWT are existing at the same time. Simply remove it if you find it unnecessary.

4. The LS achieves 1/2XP if resurrected (current XP, so if it was highly eager to serve the emperor it may start at max. LV).

Edit: Heroes Mod for SS
Some unneeded things removed.


There are still some problems i couldn't solve:

1. Entrenching/uprooting the HWT fully restores its health.

2. Detaching Squads restores the morale of the attached squad (I noted this in the heroes_manager).



I thought of something else which might or might not be an issue: the archon incubus behaviour. those were staying on lvl 1 all the time.. the archon gets stronger and stronger, and his incubi just... die around him *g* thats ok, in essence, for the archon (he still is a strong commander-unit, and the incubi let him lvl extremely fast), but I was thinking about it and I guess, lvlup only goes for the exact squad type, which means all reinforced units (by hitting the big fat +). but the archon incubus (and the IG addons) are not such reinforcements and as such are not affected... so this would also be true for every kind of squad leader.. even though it might not be as easy to find out (the impact of this problem, if it exists at all, cannot easily be seen, except when watching a squad very closely - in battle nearly impossible *g*).. sometimes, those leaders are quite important, i.e. for tau ghost (makes 1/4 of the whole squad and emp and most damage) or eldar guardsmen (sees infiltrated units so should not be killed easier than normal guardsmen *g*) and should lvl up like their fellow comrades..


This cannot be changed, modifiers are applied to squads not to certain units,... sorry.
Either the squad leader achieves this bonus or the last unit alive.

Edited by Cultist, 21 April 2008 - 07:24 PM.


#13 RobertW7928

RobertW7928
  • Members
  • 48 posts
  • Location:Australia

Posted 22 April 2008 - 03:57 AM

Hey there this seems very promising to some flaws that currently exist you could say, how about retaining level for chaos lord to daemon prince? I hope you get EVERY unit working or at least almost and I know it can be possible you just need to found out how =/, will this be included in v3.01/v3.1?, on the topic of hero's in the campaign some campaign units don't have the ranking applied like the sisters and DE honor guard and commander units and some of the others like the honor guard Grey knights, I know I mentioned something similar in the AI mod forum but i thought it was appropriate to add something here to.

#14 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,166 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 22 April 2008 - 11:59 AM

Cultist - one major thing, can you work with Arkhan to remove those "squad name" calls from the core Heroes .scar file? There should be no mention of any actual squad names in there -- thats what the <faction name>_race.scar files are for. This makes things MUCH MORE cleaner and modular.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#15 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,166 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 23 April 2008 - 03:40 AM

Update.. Yep your new updates HEROES code does retain alot of unit's XP when doing things we thought would not allow for them to be retained.

I got this console warning that you might find interesting when using your improved HEROES code:

*ALERT: [string "Command.scar"]:405: SGroups must contain only one squad
Group with name Squad already exists, be very careful!
Group with name AttachedSquad already exists, be very careful!

and this at some point:

*ALERT: [string "Heroes/Core/heroes_manager.scar"]:508: attempt to index field `?' (a nil value)

Any ideas why those happened in the console?
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#16 Cultist

Cultist
  • Members
  • 34 posts
  • Location:Vienna, Austria

Posted 23 April 2008 - 02:28 PM

I got this console warning that you might find interesting when using your improved HEROES code:

*ALERT: [string "Command.scar"]:405: SGroups must contain only one squad
Group with name Squad already exists, be very careful!
Group with name AttachedSquad already exists, be very careful!



That's because garrisoned squads match the same conditions as dead squads. I had to add a condition which checks if squads are attached, this doesn't work if the atached squad dies while being attached. New unit check added, need to test if everything works correctly.


and this at some point:

*ALERT: [string "Heroes/Core/heroes_manager.scar"]:508: attempt to index field `?' (a nil value)



A global variable stores the HWT Index, this is no good.


Changed: transformed squads upgrade immediately now.

I have two versions, this improved one and another one where this garrison/ungarrisoned thing works automatical, it works with buildings and transport as well but (there is no is in transport check :) ) putting an attached squad into transport spams the console with error messages. I will upload both when finished testing.

#17 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,166 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 23 April 2008 - 02:34 PM

Good good.. what about removing the faction unit names from the core HEROES scar scripts? We should maintain a clean logic and keep faction data out of there. Possible?
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#18 Cultist

Cultist
  • Members
  • 34 posts
  • Location:Vienna, Austria

Posted 23 April 2008 - 02:38 PM

Yes, this is done.

#19 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,166 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 23 April 2008 - 02:43 PM

Fantastic! So the unit names are all moved from the heroes_manager.scar to the individual faction hero .scars? Beautiful!
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#20 Cultist

Cultist
  • Members
  • 34 posts
  • Location:Vienna, Austria

Posted 24 April 2008 - 01:02 PM

Attached File  Heroes1.rar   17.19KB   5 downloads
Attached File  Heroes2.rar   15.82KB   3 downloads

changes: HWT/HWTE training time synchronized.
D/NB are generals now.


Added two unit checks which should find every dead squad.

Heroes1: one more unit check added to identify attached units which ungarrisoned, didn't detach (to reapply modifiers) and the squad died.
Heroes2: ungarrisoned units get their modifiers immediately (error messages show up while in vehicle transport).



Reply to this topic



  


2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users