-
Posts
17.982 -
Joined
-
Last visited
-
Days Won
579
Everything posted by Stan`
-
Well it's possible the owner isn't set when we set the color, and so it sets gaia instead of something else. Although from your logs it looks like the color is correct
-
does this have any vampires or gods
Stan` replied to vampygirl699's topic in Introductions & Off-Topic Discussion
Most of the RTS stuff is already written, you just need to reskin units to be vampires and whatnot. And maybe some new buildings to fit more the theme -
Well first, you have to figure out when the code is called and with what params
-
The Guinterface forces a reload of the color, a bit like the on update That's why the color is changing. I'm wondering if we don't switch the color too early, causing the gaia color to be taken...
-
In order to make mods more maintenable, we recommend users only override functions they touch rather than the whole files. You would usually have a file named ~GuiInterface.js with only the modified functions. After the Guiinterface change ?
-
does this have any vampires or gods
Stan` replied to vampygirl699's topic in Introductions & Off-Topic Discussion
Yeah, with some art effort you could, probably needs some programming if you require special powers for units. -
Does it call it with a different color onupdate and the first time it's called ?
-
Does the other building have ParticlePlayerColor in its template ?
-
For the diplomacy color https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js#L903 you might need to add the IID_ParticlePlayerColor to that function (Create a file with just that function that will be called after the actual one) GuiInterface.prototype.UpdateDisplayedPlayerColors = function(player, data) { let updateEntityColor = (iids, entities) => { for (let ent of entities) for (let iid of iids) { let cmp = Engine.QueryInterface(ent, iid); if (cmp) cmp.UpdateColor(); } }; let cmpRangeManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_RangeManager); let numPlayers = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager).GetNumPlayers(); for (let i = 1; i < numPlayers; ++i) { const cmpDiplomacy = QueryPlayerIDInterface(i, IID_Diplomacy); if (!cmpDiplomacy) continue; QueryPlayerIDInterface(i, IID_Player).SetDisplayDiplomacyColor(data.displayDiplomacyColors); if (data.displayDiplomacyColors) cmpDiplomacy.SetDiplomacyColor(data.displayedPlayerColors[i]); updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ? [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] : [IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_ParticlePlayerColor], cmpRangeManager.GetEntitiesByPlayer(i)); } updateEntityColor([IID_Selectable, IID_StatusBars], data.selected); Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors(); }; When it's being constructed, or after it's been constructed ?
-
That's because the foundation actor doesn't take it into account You have to change https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/templates/special/filter/foundation.xml probably by adding <ParticlePlayerColor merge=""/> Yeah we probably need a hook for the diplomacy color thingy, I'm not sure whether it sends an event message or not
-
I also tried to experiment with the add blending for particle but all I managed to get was a glow
-
Use as much pure white as you can for the texture
-
Can you figure out at which point the particle color resets exactly ?
-
hopefully we'll have more visibility in september, but no, no expected month.
-
Can you show me the actor? and the template
-
No date yet. Few things to solve and not enough activity
-
Mmh that's a bit strange. Does the building switch variants a lot (Does it have animations or specific states)? Unfortunately there is no GetVariable so we cannot check if the values changed. Maybe there is an event we should be listening to.
-
Also note that using setvariable you could say change the intensity of the fire of the flying vehicles
-
Made a few more tests with this particle: <?xml version="1.0" encoding="utf-8"?> <particles> <texture>art/textures/particles/dust_256a.png</texture> <blend mode="over"/> <constant name="emissionrate" value="1000.0"/> <constant name="lifetime" value="10.0"/> <uniform name="angle" min="-3.14" max="3.14"/> <uniform name="velocity.x" min="-1.5" max="1.0"/> <uniform name="velocity.y" min="2.0" max="3.5"/> <uniform name="velocity.z" min="-1.5" max="1.0"/> <uniform name="velocity.angle" min="-2.0" max="3.0"/> <uniform name="size" min="7.4" max="7.5"/> <expr name="color.r" from="colorr" mul="1.0" max="1.0"/> <expr name="color.g" from="colorg" mul="1.0" max="1.0"/> <expr name="color.b" from="colorb" mul="1.0" max="1.0"/> <force y="-2.5"/> </particles> Custom actor: <?xml version="1.0" encoding="utf-8"?> <actor version="1"> <castshadow/> <group> <variant frequency="1" name="Carthaginian House"> <mesh>skeletal/celt_trader.dae</mesh> <props> <prop actor="props/structures/decals/dirt_small.xml" attachpoint="root"/> <prop actor="particle/construction_dust.xml" attachpoint="root"/> </props> <textures> <texture file="structural/kart_struct.dds" name="baseTex"/> <texture file="structural/kart_struct_norm.png" name="normTex"/> <texture file="structural/kart_struct_spec.png" name="specTex"/> </textures> </variant> </group> <group> <variant frequency="1" name="ungarrisoned"/> <variant name="garrisoned"> <props> <prop actor="props/special/common/garrison_flag_kart.xml" attachpoint="garrisoned"/> </props> </variant> </group> <group> <variant name="alive" frequency="1"/> <variant file="structures/cart/light_damage.xml"/> <variant file="structures/cart/medium_damage.xml"/> <variant file="structures/cart/heavy_damage.xml"/> <variant file="structures/cart/destruction_small.xml"/> </group> <material>player_trans_parallax_spec.xml</material> </actor> I used a custom texture for the following one: I used the following texture: -> (It's not all white) Few notes: Hotloading particles is crashy as in changing a few values can crash the game. SetVariable won't work if you hotload particles (each time you change a value in the XML or the modle you have to restart the match) Fortunately you can use the following code in your tests (Don't use in production) that will keep forcing the variables at each frame. class ParticlePlayerColor { ... Don't touch the previous code. OnUpdate() { this.UpdateColor(); } } As for the grey in the middle it's due to particles decaying maybe it's an engine bug @vladislavbelov would know.
-
Nice work. This is why stella artis was made happy someone else made a scifi mod
- 1 reply
-
- 1
-
-
Hmm that's really strange because I tested that code earlier and I had blue and red dust X) And yeah emission rate has to be constant I hacked the foundation code that relies on builder numbers. What values do you have in player colors ? I will test some more tomorrow
-
<?xml version="1.0" encoding="utf-8"?> <particles> <texture>art/textures/particles/dust_256a.png</texture> <blend mode="over"/> <expr name="emissionrate" from="numbuilders" mul="50.0" max="200.0"/> <uniform name="lifetime" min="3.0" max="5.0"/> <uniform name="position.x" min="-8.0" max="8.0"/> <uniform name="position.z" min="-8.0" max="8.0"/> <constant name="position.y" value="1.0"/> <uniform name="angle" min="-3.14" max="3.14"/> <uniform name="velocity.x" min="-1.5" max="1.0"/> <uniform name="velocity.y" min="2.0" max="3.5"/> <uniform name="velocity.z" min="-1.5" max="1.0"/> <uniform name="velocity.angle" min="-2.0" max="3.0"/> <uniform name="size" min="5.0" max="7.5"/> <expr name="color.r" from="colorr" mul="1.0" max="1.0"/> <expr name="color.g" from="colorg" mul="1.0" max="1.0"/> <expr name="color.b" from="colorb" mul="1.0" max="1.0"/> <force y="-2.5"/> </particles> This is the one I tested with. <ParticlePlayerColor/> Should only be in the building template in simulation/templates
-
Try with the dust texture ? Can you show your particle file ?
-
You need to use a texture without colors. Such as the one for dust it doesn't colorize it just reduces the rgb value of each pixel so if you have a blue texture you can only do shades of blue.
-
My bad, you also need an interface for that component in simulation/components/interfaces add a new file called ParticlePlayerColor.js With this content Engine.RegisterInterface("ParticlePlayerColor");