Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - aRandomKiwi

#1
Hi,

I create this topic in order to have your opinion on the addition of a new functionality to the mod, to know if players are interested :

What do you think about a new feature that will allows mods providing weapons and armor to create (uniforms and weapon sets) for each level of mercenaries (for example in a MFM_Stuff.xml file in their base folder), that "mercenary for me" would read at rimworld startup and thus build a list of uniforms / weapons sets.

For those who know, a bit the same way that rimthemes works with the themes in other mods.

Two new selectors would be added to the Hiring dialog allowing the player to choose which type of (uniforms / set of weapons) to use for recruited mercenaries.

Even if the (weapon / armor) mods authors do not want to participate, anyone could release a mod containing their own (uniforms / set of weapons) by just specifying that the mod depends on mercenaries for me and the mod / mods. 'weapons / armor used.
Or share with me his set so i add it directly in Mercenaries For Me.

It will allow to have descent sets of (uniforms / weapons), for example MSF, Umbra Company, ... from the nice mods of Chicken Plucker, instead of random generation that can result in nonsense gears and weapons as it is currently the case.

if interested i will publish (when the feature implemented) a simple specification for those wishing to create packs of (uniforms / weapons) for Mercenaries for Me (just how to fill the MFM_Stuff.xml file).
#2
Help / Bug in GameComponents ?
November 19, 2018, 01:52:27 PM
Hi,

Can someone explain me why the constructor of implemented GameComponents class are called 4 times (instanciate 4 times ?) ? Is it a normal behavior ?

Because i noticed that when i try to access the GameComponent instance with " Instance = (GameComponent_Test) Current.Game.components.Find(x => x is GameComponent_Test); i get sometimes different instance (not the same properties i changed earlier), so to solve this i get only once time the reference instance and store it in a public static class.


Reproduce :
Simply implement a dumb GameComponent with alert in constructor :


public class GameComponent_X: GameComponent
    {
        public GameComponent_X(Game game)
        {
            Log.Message("Test");
        }

        public GameComponent_X()
        {
            Log.Message("Test");
        }
}


Thanks
#3
Hi,

Is it normal that "CompTickRare()" of a custom CompThing appended with a Patch to Vanilla Coolers (Building_Cooler) is never called ?
I watched  the def file of the cooler, and there is a "<tickerType>Rare</tickerType>" so i dont undestand why this dont work, is there any way to get this method called ?

The patch work because i overrided the "CompInspectStringExtra()" of the custom ComThing and i can see the text returned on the Cooler.


Thanks
#4
Hi,

Does it exist any Getter/Setter of global variable in a Rimworld save ?
Because i manage a global counter variable (integer) in a static method (so no ExposeData stuff ) but i want this variable to be persistent across reloading.

Thanks
#5
Hi,

For a mod i do, i use a copy (properly renamed) of the SoundDefs of the geothermal generator (GeothermalPlant_Ambience_Start, GeothermalPlant_Ambience_Stop, GeothermalPlant_Ambience), it's fine but the building which i assign this soundDef is not a generator, so when there is a power loss it should not continue play the ambiance but instead play GeothermalPlant_Ambience_Stop, and then when power come back GeothermalPlant_Ambience_Start again.

Is it possible with XML only or it need some C# stuff (just give me functions needed) ? i dont see any way of doing this.

Thanks !
#6
Help / Disable/Enable Gizmo in a building ?
November 08, 2018, 07:42:26 PM
Hi guys,

Is it possible to disable/enable an Gizmo  (button) ? because i try to disable the gizmos of a specific cooler (i need to re-enable them later) to prevent the player to change the targetTemperature :


foreach (var item in cooler.TryGetComp<CompTempControl>().CompGetGizmosExtra())
                {
                    item.disabled = true;
                    item.Disable();
                }


But this dont work, and even if the Disable method work i dont see any Enable method to re-enable the gizmo... is it the correct way to do this ?

Thanks !