I am planning to make a new ability to enable the unit to switch between like bolters and missile launchers. I looked into SoB emperor's touch ability. That ability use change default hardpoint modifier with time duration ability. I try to do the same but with on/off switch button. The problem is, it never switches back and stays at higher weapon index number no matter I click the button to off again (with that said, the marine will always show and use the missile launcher). Please share some insights or maybe answer to this? Thx
Is it possible to switch between default wargear and upgraded one?
Posted 14 March 2021 - 06:02 PM
Hello brother Tony33.
The only way to do that, is with the SoB emperor's touch ability mechanic you mentioned, as a TIMED ability...
Regrettably, toggle or on-demand hardpoint change does not work.
Meaning that (besides the weapon_change ability mechanic), once as hardpoint is increased by a modifier, it CANNOT go back.
It is limiting, but there is a special reason the designers decided it (I can elaborate, if you want).
Anyway, if you need examples on how to do it a bit differently than Vanilla, see how I coded the Harmonics ability ion Emperor's Children.
For a melee weapon alternative, have a look at the Hammerhand ability in IDH ( for that, I had to create more weapons for ALL attached commanders, because the weapon_change affects the WHOLE squad).
It is a bit limiting, regardless...
Posted 15 March 2021 - 02:09 AM
Ty brother Gambit
It seems I have to drop that idea for a toggle weapon switch. I thought about using OE to create different sets of motions to divide different wargears and make them into essentially two hardpoints and use ability to enable and disable different hardpoints. But I assume the art part wont change even the related hardpoint is disabled, so the final outcome might be both hardpoints' visible parts coexist.
I am curious about the intention why game dev decide to do so, and want to know the special reason behind it.
I also take a look at Harmonics, noise marine ebps and sbps. That ability use enable_upgrade modifier, and I found a bunch of dummy weapons in noise marine hardpoint. Could you explain how it works? Both ammo switch toggle (like the missile switch in Imperial Fist hammerfall bunker) or emperor touch is pretty straightforward and easy to understand. Is Harmonics related to SCAR or other things I missed?
Posted 15 March 2021 - 09:51 AM
The flexibility regarding Hardpoint Swapping is limited, so I understand your decision to skip it altogether.
OK, so weapon upgrades were mostly intended for researches (like the plasma pistols for SMs), and squad upgrades (like Beavy Bolters for SMs). And these must be PERMANENT, the designers didn't want "rogue" modifiers fiddling with the weapons. Because it would cause ugly visual results.
That is why the designers FORBADE reverting hardpoints to previous ones.
For harpoints, there is only ONE way. Up (I mean the NEXT one, of course).
As for the Noice Marines Harmonics, there are a couple of things to consider:
- The actual index of each weapon is calculated INTERNALLY. Meaning that, if you have weapons only in (say) weapon_03 and weapon_07, then the engine will consider the first (the _03), as the FIRST weapon, and the second one (the _07) as the SECOND weapon. The _01 and _02 and so forth of the AE enumeration is only for the user.
(The same goes for Hardponts!)
- So, in order to swap weapons, you need to add DUMMY ones in-between, not simply "skip" entries.
- Also, using weapon_change to jump to a non-existent hardpoint (say, I have 4 weapons, and I order a weapon_change of 6), will jump to the LAST weapon in the list, of the specific hardpoint.
- Now, weapon_change swaps ALL weapons to the ordered harpoint.
So, in order to achieve the desired end, I HAD to enable/disable certain hardpoints, AND to make sure I added many dummy ones, so when the swap happens, NO attached leader to suffer the "swapping" effect as well!!
It is kinda like "playing with fire"
You must know exactly what you are doing - and in such delicate issues, only trial and error is actually what works.
Edited by Gambit, 15 March 2021 - 09:52 AM.
Posted 16 March 2021 - 12:36 AM
ty I got to know the mindset behind this ability mechanics.
Btw, hardpoints being hardcoded like this is a sad thing. Something like tactical marine in DoW2 with unlimited times of research to swap different gears or commander's wargear panel would add some more flavor to DoW1 if it is possible (though afaik, wargear systems work totally different between these two games).
- Gambit likes this
Posted 16 March 2021 - 02:35 PM
But since I just want to tweak around the predator to swap between lascannon loadout and battlecannon, so I will look into Possess module in ebps like chaos lord and just swap two squad instead.
Edit: I tried using possess function, it is quite easy to achieve desirable effect. But when it comes to hero system from the community SCAR, it seems it will lose track and count the possess module resulting squad as a totally new one (from mechanics pretty reasonable). Is it possible to transfer the Hero system data to the new squad?
Edited by Tony33, 17 March 2021 - 09:58 AM.
Posted 17 March 2021 - 03:29 PM
Well, possess is one solution, but it still has some issues, like the fact that there IS a small "glitch" whne the squad is possessed by itself, with the different hard-point. For example, most of the times there is a x-z spatial axis displacement.
If you disregard that, then yeah, it is OK
And of course, the issues with possession is that it can only be applied properly, to single-entity squads. Like vehicle or Heroes.
Now, the Heroes SCaR, even in my own advanced version (I updated it so that to keep the levels after a Save->Load, plus I added some other fixes), does NOT support possession. See, whenever squad uses possess_ext, there is no easy way to the new Squad_ID (each time a unit uses posses, a NEW squad is created, and the exact next intrinsic squad_id enumeration used by the engine).
BUT IT IS possible of course. Tricky, but possible. I have already come up with a method
The thing is, it needs much code updating.
If my only tasks were SCaR- or AI- related, I would have coded in, those updates.
But unfortunately it requires too much time to do that and it is not THAT important. I think.
Given the difficulty of the task, I know only a couple other brothers able to do that, except me.
But if you DO have codding knowledge, just say so, and I will briefly describe what needs to be done!
Posted 18 March 2021 - 01:57 AM
Yes, I also noticed the displacement issues.
As for the coding, unfortunately I only have some very basic knowledge about it and SCAR, only capable to spawn some units. But I would glad to hear what I should be preparing and your solution to the possess_ext. BTW, I also want to learn something about LUA language but sadly SCAR related knowledge site are largely not accessible :(
Posted 18 March 2021 - 08:55 PM
SCaR is very simple, and anyone with prior coding knowledge will have an easy time with it
Even easier than Python.
BUT... Like all things, one needs time to adjust. Both to the new functions, and the environment.
Now, regrading Heroes, the solution's conception is "easy", the implementation.... Not that much.
The idea is:
1] For units that can posses, to additionally store: Position and Possessed name squads. (This means race profile updates as well)
2] Whenever a unit is possessing (we need a rule checking it) AND/OR it no longer exists, to check if a squad with the possessed name exists in proximity of the old one. The rule must have an interval of 0 (or 0.125 sec, since the engine makes 8 "passes" per sec: 0.125x8 = 1sec), so than NOT to mess things up, with any other possible squads!!
3] If so detected, transfer current experience to the new squad, with the appropriate adjustment factor, based on "type difference".
It sounds easy, and perhaps it is...
Bah, for any experienced coder, it is a piece of cake, really
BUT even for him, it needs time to implement.
If I ever do that, Experience will get an UI BAR.
Like in Warcraft III, or any other game with levels.
I mean, if we are to make it perfect, ... we will make it PERFECT. No compromises.
Reply to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users