Loading...
  OR  Zero-K Name:    Password:   

mod help request..

11 posts, 185 views
Post comment
Filter:    Player:  
sort
iv been trying for a long time now.. many many days.. many many ways..

the code runs with no errors.. im confused as to what the issue is =/

is it not possible to give the coms a new explosion that deforms the map using only tweakdefs or unit tweaks?

it feels almost asif these are overwritten somehow after i change them

+0 / -0
4 days ago
are you on the standalone client?
+0 / -0
im not sure what you mean. im using a steam version but that cant be what your asking me? sorry im confused

is this question relivant to the problem above? thanks for your help!
+0 / -0

4 days ago
You should know that isoneguy on the forums is the same person as isoneguy in #zk chat.

I know that the weapons that handle unit explosions are defined elsewhere in the codebase, for example here: https://github.com/ZeroK-RTS/Zero-K/blob/master/weapons/estor_buildingex.tdf

So it might be that you can't use a unit's defined weapons as an explosion. But I don't know this for sure, just adding fuel to the fire. tdf seems to be an ancient spring text file format that Lua was replacing over time. The bombs like snitch do define regular lua weapons in their weapon defs though, so it's certainly possible to define a custom explosion per unit in lua. The dynamic coms are modified a lot though, and the self-explosions are definitely changed as the coms level up. The com data seems to be in gamedata/modularcomms, where in clonedefs.lua it upgrades the model size and explosion. I don't fully understand how everything changes though.
+1 / -0
3 days ago
you can use a units defined weapon as an explosion.. thats easy since you can modify what already exsists and tweakdefs has no trouble changing a units explodeas.. the problem is giving a unit a new weapon using tweakdefs since thats not possible on coms it seems... im having allot of trouble with this
+0 / -0

3 days ago
Alright, looking at this file: https://github.com/ZeroK-RTS/Zero-K/blob/master/gamedata/modularcomms/unitdefgen.lua#L325

[Spoiler]

I think you should try replacing your local valid check with if data.customparams.commtype for all unit IDs, see if it works. Then see if it works for the upgraded coms. What might be happening is first the game generates a lot of chassis for different leveld coms, then it applies your changes, then players get these generated level1 chassis which you don't know about. But you should be able to find the generated coms by searching for commtype existing. Return with status I guess?
+0 / -0
I still suggest you to make a real mod, it solves everything.

the process is :

load unitdef files.

run tweakdefs.

gen commander unitdefs.

https://github.com/ZeroK-RTS/Zero-K/blob/master/gamedata/modularcomms/clonedefs.lua#L12 changed explodeAs.
But it just changed high level and I didnt figure out why lv1 comm dont explode normally, .

(and im lazy to check)

you dont need to set weapon.

If you really want to make tweakdefs, you can look https://zero-k.info/Mods/Detail/94 's code, which hacks Spring.Echo to do op things.

Btw you can have a widget
[Spoiler]
+1 / -0
2 days ago
ok ill change to real mods.. i resisted for long enough
+2 / -0
confirmed the issue is dynamic weapons overiding weapons changes after my scripts.. even with echo hijacks i could not get it to work.. i did get it to work on a duck but i could already modify that.. so full mods is the only known way.

[Spoiler]
+0 / -0
Try this:


[Spoiler]

Looking at the minus and the plus lines, stop identifying coms by their names or whatever, but just see if the unit def has the commtype customparam. All unitdefs with the commtype customparam will be the commanders you're looking for.
+2 / -0
oh hmm ok ill try that thanks =)

the code probably needs a bit of work too.. ill fix it up tomorrow as i have some things i have to do today
+0 / -0