Jump to content


Photo

Heroes mod applying modifiers only to single unit in squad?

heroes scar lua

2 replies to this topic

#1 CrancK

CrancK
  • New Members
  • 2 posts

Posted 04 November 2018 - 12:11 PM

So a long long time ago,

 

i played with cuttershane's heroes mod, and it was awesome

later with the soulrpg one (which is the one from dowai i think?)

 

now i always wanted to change it back to be unlimited levels, which back in day i couldnt figure out how

but i've recently found my wh40k urge again, and dow1 still is the best one, so i took another stab at it.

 

This time i managed to get infinite levels in, i also changed some other things and just generally fucking about with the code.

 

However, i feel like i hit a snag which i cannot find the information on anywhere.

 

As the title says, as far as i can tell, by seeing the range and speed of a single unit in a high-level squad, but the rest of the squad being absolute trash still

i get the impression that the Modifier_ApplyToEntity function or the modifier created with Modifier_Create only applies any of the buffs to a single unit in a squad

 

now ofcourse this works fine for heroes and single units and for the default heroes mod with max 7-10 levels it's likely fine aswell.

But it starts to get really noticeable when a unit has had like 30+ levels and one dude is racing ahead of its squad or can shoot further than anyone else in his squad

(also single superhealthy dudes in a squad where all his mates keep dying, must be agony for that one dude :D , truly the highlander )

 

Now in the hope that there's still someone here who remembers when cuttershanes mod was changed to heroes mod and thus has experience and knowledge about the inner workings of the scar functions and/or differences between cuttershanes version and dowai's version.

Tho perhaps my memory is simply faulty and cuttershanes version also had this problem, since i can't really find much difference in the way he applies the modifers in comparison the the dowai version

but ye, imma hoping there's people here who have the knowledge i seek

 

Also i can't really find any usefull functions in the scardoc which may lead me to be able to check a squads entity ids per (alive) unit

(tho to be fair i will just have to do some more testing, also i think i have an old scardoc since some functions like the way the unit level is shown (UI_ShowCount) isnt in the scardoc i have)

 

I'm thinking, if i can somehow figure out all the entity id's of units within a squad, i can make an egroup and use ModifierUtil_ApplyToEGroup or something similar, hell even if it's just a for loop with all the entity id's

my theory being that applytoentity only targets a single unit in a squad, thus needing a way to target them all

 

So ye, anyone here perhaps have any idea's to point me in the right direction?

perhaps my train of thought is wrong and entity and squads are more interchangeable then i think?

 

Would love any and all input



#2 Gambit

Gambit

    title available

  • Members
  • 6,718 posts
  • Location:Athens, Greece

Posted 04 November 2018 - 05:15 PM

Hello brother.

First, let me say that I started working on my version of Heroes sometime back, but recently my RL workload AND modding workload was huge, so I left it at (about) 20%.

There are MANY things that must be addressed, and there are many things that are not optimised - and thus the code is a bit "bulky" - but this is an assessment made by a guy...  AFTER 15 years of the game's release!!!

All I am trying to say is that the code BEGS for an update.

But at this point, I am not sure that I will continue...

 

Anyway, back to your question:

...I can't really find any useful functions in the scardoc which may lead me to be able to check a squads entity ids per (alive) unit...

There isn't any as far as I know, so this is impossible to do.... :ermm:

 

Furthermore, just think of some more things:

- Say you attach a commander to a squad. While the EntityID of the commander is valid, his SquadID NO longer exists.

- If you apply a modifier to a squad and it is despawned, you will have to RE-APPLY it, once it is respawned.

- The "problem" with the attached commander being mush faster, or able to shoot much further that the squad he is attached to ... needs some more coding to address.


-In search of Papasmurf...

#3 CrancK

CrancK
  • New Members
  • 2 posts

Posted 04 November 2018 - 05:41 PM

hi gambit, thanks for your reaction

 

do you perhaps have a "newest" version of the scardoc?

 

i've searched high and low on google, but i've only found a scardoc thats from when dow 1 came out or all the scardocs from company of heroes

 

and ye the other points you make, i totally get that

already figured that if i get stuff working the way i want, i'd probably have to revamp the entire thing just to make it work more logically and less "bulky" as you say :p

 

-commander problem seems fixable, specially if i can somehow fetch id's per unit instead of per squad,

even if not, scardoc shows functions to get info about leader from a squad,

so even if i can't give the commander the modifiers while he is in the squad, it's possible to check if he's in a squad and when he leaves the squad, just check for a "new" squadid when he leaves again and reapply any modifiers.

-re-applying needs to be done yes.

-it actually isn't always the commander/leader weirdly enough, it would've been more logical yes, but i've seen a space marine squad with heavy bolters, where one heavy bolter would shoot before(/farther than) any other heavy bolters,

and ehm, warp spiders where it also wasn't always the leader that would be the fastest. in fact since i knew attaching commanders always was a problem i specifically never did that so far.

oh also seen a seer council, where one dude was almost unkillable, but the rest of his squad just died easily

 

as i said originally it just seems like all the modifiers that were added with mat_entity, only get applied to a single entity in the squad, which you know... kinda makes sense...

 

so ye if you by chance have a latest version of scardoc, that might help, i've seen a bunch of usefull functions in the coh scardocs, but i dunno if they exist in dow ss





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users