[A17] CompFX (Tool for Modders)

Started by CannibarRechter, October 02, 2017, 06:59:57 AM

Previous topic - Next topic

CannibarRechter

#15
Post your xml when you used the triggered prop

Edit: note that the bug in "Worked" is it doesn't show the FX until the work is done. So if you got the tag to express, then perhaps it was working (working, but not doing the right thing) and you missed it.

I believe this may be a bug in my own code, and have a theory which I'll explore when I get the chance. If it's not my code, and it's an issue with the underlying NotifyUsed() function in the core, then fixing it may be quite a bit harder.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

swefan

Later I will try to do some tests, maybe even with different triggers and effects

P.s. in CompProperties_Refuelable there is <consumeFuelOnlyWhenUsed> a dependency like that will be perfect

CannibarRechter

Hi, I fixed the bug and upped the version. The bug was merely a problem with checking > instead of >=. Since the Worked event was being updated continuously while work was being performed, the current ticks and last ticks were always the same until worked stopped. Now I checked to see if they are >=, and then it works.

Here's my comp for the ElectricStove:


<li Class="CR.CompProperties_FXOverlayTriggered">
<fxType>FX_Overlay</fxType>
<fxPath>FX/HotStove</fxPath>
<fxSize>(3.5,1.5)</fxSize>
<fxTriggerDurationTicks>300</fxTriggerDurationTicks>
<fxSignalName>Worked</fxSignalName>
</li>


Note that FX/HotStove is not something disseminated with the FX package. It's for my (ongoing) texture mod. You can just change it out with FX/BlastFlame if you really want to see it happen, to prove it is working. Can't miss a big giant fireball ;-P
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

swefan

Yeah this works, and works even my comp just changed a line...
wasn't my fault  ::) I wrote as you wrote in the documentation provided with the tool:
<fxSignal>Worked<fxSignal> or, realized that the error was in this line
<fxSignal>Worked</fxSignal>
instead of
<fxSignalName>Worked</fxSignalName>


Anyway, the timing is perfect, good work!!






CannibarRechter

Ah, oops. I was wondering if something like that may have happened. In the documentation, I just type it out. I'll go fix so noone else gets burned by that.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

tobe

Can I use it pawns? or only building can use it?

CannibarRechter

#21
It should work on anything that can take a comp; the only pawns I've tried it on are Misc Robots. You can find me using them in my graphics overhaul mod. The hauler has a flashing red indicator light, and the cleaner has both a blue indicator, and a soft blue glow underneath the cleaner (and 'below' render).
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

kaptain_kavern

Thanks for releasing this. I really need to have a look on how it works later with some more time.

Anyhow, thanks a lot

CannibarRechter

It should be pretty easy. See Examples.xml.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

Harry_Dicks

I really need to figure this stuff out. I'm ready to add flames and glows to everything!

diannetea

#25
Does this support changing the drawSize of the fx?  I ask only because I'm trying to put something under a stove, and due to the drawSize of the stove being larger it's hard to place the item properly underneath it.  I assume if the drawSize was the same for both of them it'd fit perfectly.

I also realize I can change the offset to position it, however this is very finicky and takes a lot of loading and unloading of RimWorld just to check if that .1 moved it to where it needs to be.  I've also sized it with the actual image of the stove, but due to the drawSize change the fx is smaller in game than it is supposed to be.


nevermind I found it >.>

Next problem:

Does this have any way to support sides?  So _front, _back, and _side FX for a thing?

CannibarRechter

#26
It should work with Multis, yes. Down in the test graphics, you'll find some test overlays to help you with that. It supports the standard rotations within the game.

I believe the setting you want is "rotWithThing" (although I did not look this is up right now, but that's what I remember). This will make your effect move around when the thing rotates.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

diannetea

#27
I checked and fxRotWithThing (looked in code) isn't actually in the Examples.xml provided.  It doesn't do what I'm looking for, however, I already have 3 graphics set up with proper naming, but it's only using the _back suffixed image.

[attachment deleted due to age]

CannibarRechter

You are looking for FX that are themselves multis? I never implemented that. I can see why you would want to (for example, if you want to change the position of the graphic without rotating it), but alas there is no such functionality at the moment. Maybe I'll look into that this weekend. It wouldn't be that hard, I think.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

diannetea