Does anyone know how I could change a weapon’s color and attach decorators to its animchar?
For that you will need to use entities.blk file.
You can create text file and then change file type to blk or just copy and paste scene.blk file.
Probably not very possible to freely edit color, but you can edit textures.
Code example:
test_colt_walker_gun{
_extends:t="colt_walker_gun"
item__weapTemplate:t="test_colt_walker_gun"
item__template:t="test_colt_walker_gun_item"
"animchar__objTexReplace:object"{
"western_weapon_handgun_a_tex_d*":t="ger_camo_winter_grey*"
"western_weapon_handgun_a_tex_n*":t="western_weapon_handgun_a_tex_n*"
}
}
test_colt_walker_gun_item{
_extends:t="colt_walker_gun_item"
item__weapTemplate:t="test_colt_walker_gun"
item__template:t="test_colt_walker_gun_item"
"animchar__objTexReplace:object"{
"western_weapon_handgun_a_tex_d*":t="ger_camo_winter_grey*"
"western_weapon_handgun_a_tex_n*":t="western_weapon_handgun_a_tex_n*"
}
}
New version of colt walker weapon. It now have silver color (sadly, but it affect to all weapon). For change weapon textures you will need to add and edit “animchar__objTexReplace:object”{}. Currently time… Probably you unable add new textures. Only use these that already in game (check dxp.bin files, open them by txt editor). Some textures you can use from old forum post made by ErikaKalkbrenner.
ak_103_gun{
_override:b=yes
"attach_decorators__entities:list<eid>"{
}
"attach_decorators__templates:array"{
"attach_decorators__templates:object"{
relativeTm:m=[[1,0,0][0,1,0][0,0,1][0,0.0,0]]
template:t="ak_103_gun_item+item_in_world"
nodeName:t="bullet"
}
"attach_decorators__templates:object"{
relativeTm:m=[[1,0,0][0,1,0][0,0,1][0,0.0,0]]
template:t="ak_103_gun_item+item_in_world"
nodeName:t="gunFx_main"
}
}
}
AK-103 with two attached AK-103. For some reasons… Player model and weapon will always visible in first person view. I don’t know how to fix it.
Need to add “attach_decorators__entities:list”{ } if you want to make “attach_decorators__templates:array”{} works fine. Inside attach_decorators__templates you can add these properties: template, nodeName and transform.
-
1 property contains info about entity. You can use any entities that you see in Create Entity.
-
2 property contains info about where to attach your template. You can find some names in Properties Panel menu (use Find Entity to find your gun).
But not all node that you see there may works. -
3 property allow you a bit rotate/scale/move this template. First three boxes affect to rotate and scale. Latest box affect to entity position in world.
If you want to change weapon that already in game then don’t forgot to add _override:b=yes.
colt_walker_gun{
_override:b=yes
"animchar__objTexReplace:object"{
"western_weapon_handgun_a_tex_d*":t="ger_camo_winter_grey*"
"western_weapon_handgun_a_tex_n*":t="western_weapon_handgun_a_tex_n*"
}
}
If you want to add new rendinst as a separate entity then you need to write it in entities.blk.
Some code example:
myNewRendinst{
_extends:t="game_rendinst_decor"
ri_extra__name:t="normandy_bunker_a102_walls"
}
As how you can note… _extends:t= contains info about other entities. And you add code to your new custom entity. ri_extra__name:t= and some other lines are propertes that you can see in Properties Panel.
Thanks so much, this is perfect. You should be getting paid for this.
A bit update post. About attach. You can attach anything to any entities. It may be not only entity that contains animchar.
Good to know, thanks.
dunno where to ask.
and sorry to bother you,
but,
me and Euthymia07 ( mostly her if i’m being honest ) when trying to find the texture for:
attachable_wear_medic_overcoat_ger_item
it appears to be not an actual texture, but a color:
( and thanks to her, i found out that the base code of the piece of equipment is: )
of interest:
_tracked:t=“paintColor”
paintColor:p4=0.3, 0.329, 0.329, 1.0
which, opens many possibilities to color codes and what not, but…
upon testing:
entity code:
test_coat{
_extends:t="attachable_wear_overcoat_01_ger_winter_item"
item__template:t="attachable_wear_overcoat_01_ger_winter_item"
paintColor:p4=0.3, 0.329, 0.329, 1.0
_tracked:t=“paintColor”
_extends:t=“attachable_tunic”
}
Scene Code:
entity{
_template:t="attachable_wear_overcoat_01_gray_ger_winter_item+item_in_world"
transform:m=[[1, 0, 0] [0, 1, 0] [0, 0, 1] [569.06, 5.11665, 120.057]]
item__uniqueName:t="coat_test"
paintColor:p4=0.3, 0.329, 0.329, 1.0
_tracked:t=“paintColor”
_extends:t=“attachable_tunic”
}
nothing really changes:
despite saving the P4/Color Data:
is there additional data that i’m missing?
it was designed for something else?
it simply does not work?
if not oh well. thanks anyway.
p.s. sorry if in advance if i’ll might replay late,
thanks. and sorry again.
Seems it’s because of animchar and texture ger_soldier_overcoat_cmask_tex_d*
Adding texture to another equipment will not able to use paintColor:
well…
that’s a shame…
i don’t get why officials can do it, but we can’t in the editor.
i would have guessed the code would have worked.
but thanks for the explanation
although, then beggs the question,
what can the p4 color data be used for?
effects ( such as coloring smokes perhaps? vehicles? )
maybe i’m using the tool in a wrong way?
Actually color data type is c.
I don’t know why paintColor uses p4 instead.
As I know… c are inside shaderVars, custom_marker and light entities. Also inside projectile/bullet code (In tracer).
Effects… Probably are in another file which I can’t find. So I can’t tell.
Well… I dunno. But not sure that color properties will fine works for other entities.
that makes 2 of us
mh… i suppose i wasn’t wrong after all:
- Color Node Appliable to items:
( it doesn’t necessarely have to be like the one in the picture. but the idea is, the more it has of controls, the better usually is )
so yeah… all we can do, is best to wait for an actual color node ( i think )
but… it still bogggles my mind.
→ we have the code
→ official code shows that to color things, we have to use the p4
→ still doesn’t work in the editor
all we can do, is best to wait for an actual color node
Or ability to use our textures.
- still doesn’t work in the editor
It actually works, but seems only for certain animchars.
Or ability to use our textures.
would love that too.
but… it can become a double edge sword.
It actually works, but seems only for certain animchars.
ah.
i will have to try that other than just clothings
It actually works, but seems only for certain animchars.
update time.
i found out what i was doing wrong:
so, in order to color things, you don’t need to crank up the colors numbers ( at least, not above 10 )
because it does work while retaining most of the details
( opposed as replacing entirely the texture: )
With color:
By Texture:
i still wished for something more intuitive, but that will do for the moment
additionally, for anyone else in the future:
the four parameters:
[0, 0, 0, 0]
Are:
first parameter is the red channel.
second parameter is the green,
third is the blue,
and fourth is the graduation / intensity of the color being applied
which if used only that last, will also make black:
unfortunately though… it will not work for like, 70% of the clothings.
hope that helps
probably optimization reasons. If we would have kroll, reichkanzlei, villa, embassy, bahnhof and reichstag + all the random city buildings in one place the game would definetly not handle it
I’m sorry if any of these have been asked but I’m brand new to the mission editor and have not found questions to any of these yet.
-
How do I change bot squads or my own squads I can spawn into the mission editor?
-
Is it possible to have weapons/ammo placed in the map respawn? After 1-3 times of picking them up they disappear. It would be nice to have them to spawn once per game and still be there every new game.
-
Is there a way to change teams other than the squad.changeTeam console command that spawns you on Team2 but playing as a Team1 squad??
-
How do I stop a victory message from appearing after the 1st zone is capped? I’m trying to make a simple Assault map, and once the first zone is captured, a victory message will appear, and if I ignore/cancel the restart, the next zone is enabled and I can capture it but the victory message will just stay on the screen the entire time. I’ve followed the basic instructions in the 2 google docs but I must be missing something.
Again apologies if any or all of these have been answered somewhere, I’m still navigating all the information around this map editor. Thank you!
How do I change bot squads or my own squads I can spawn into the mission editor?
You can do it by editing custom_profile entity (custom_bot_profile for bots). More info you will able find there: Custom Profiles (Guide).
Is it possible to have weapons/ammo placed in the map respawn? After 1-3 times of picking them up they disappear. It would be nice to have them to spawn once per game and still be there every new game.
Sadly, but currently time here no easy ways to do it. I would say “not possible”, but we can override entity stats using entities.blk. I have some ideas. If I’m on right way then I’ll able to do item respawn in weekends and sent code.
Is there a way to change teams other than the squad.changeTeam console command that spawns you on Team2 but playing as a Team1 squad??
You can set team in Sandbox Config.
If you want to change squad presets to another country then you can use squad.spawn console command, but there you will need to write correctly squadID name (for example ussr_berlin_rifle_1). This command don’t change team.
How do I stop a victory message from appearing after the 1st zone is capped? I’m trying to make a simple Assault map, and once the first zone is captured, a victory message will appear, and if I ignore/cancel the restart, the next zone is enabled and I can capture it but the victory message will just stay on the screen the entire time. I’ve followed the basic instructions in the 2 google docs but I must be missing something.
You probably missing part about team__score and team__capturePenalty. If you set any team__capturePenalty then team will lost X team__score after that enemy capture team zone.
Hey guys, is there a way to make that the planes can capture sphere domination zones?
Weird. Property capzone__canCaptureOnVehicle doesn’t work on aircraft
You can try to mix aircraft with vehicle using entities.blk, but currently time I can’t tell what exacly you can do it.
Excuse me, has anyone noticed some driving issues with Object-279? It seems that it can’t be driven normally.
Meanwhile, it seems that the lighting effects on the moon map will automatically disappear and other event profiles cannot be enabled