Unlocking VerbClasses with a researchMod?

Started by apljee, March 26, 2015, 09:14:40 PM

Previous topic - Next topic

apljee

I'm just wondering if it'd be possible to unlock a VerbClass for shooting a weapon in the game by using researchMod? (because as far as I know it's impossible to do without researchMod) I'll give you an example - I have a Cable-Backed Bow in my unfinished mod, and I'm looking to make it so that the fire arrow verbClass to shoot will unlock after the Fire Arrows research is unlocked.

mrofa

You mean a bow that shot with normal arrow but after research it shots with flame arrows ?
All i do is clutter all around.

skullywag

yeah youll need to do a search in the def database for your weapon def and change its verb in that. This would mean they would only shoot fire arrows from then on though. The researchmodspecial in the core turret almost does this for you. This is off the top of my head so might not be that straight forward but I cant see a reason it wouldnt work.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

mrofa

Or you can just do it on a projectile itself, it would change the its damage formula and looks dependable on research, you can check that out in my radiation gun projectile.

As for turret research mod im not sure, im atm still testing it but cant get  it to work with buildings properly.
All i do is clutter all around.

skullywag

i do it in my omniturret mod if it helps.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

mrofa

Skully abit of offtopic, did you manage maybe to use that research mod to change, stuff like max health of a building ?
All i do is clutter all around.

skullywag

yeah thats possible, setup a new researchmodsomething, heres my turret one:


public static void OmniTurretCooling()
        {
            if (runonce == false)
            {
                List<ThingDef> list = (
                        from t in DefDatabase<ThingDef>.AllDefsListForReading
                        where t.category == EntityCategory.Item && t.building != null && t.building.turretBurstCooldownTicks > 0
                        select t).ToList();
                foreach (var c in list)
                {
                    c.building.turretBurstCooldownTicks -= 10;
                }
            }
            runonce = true;
        }


it should be as simple as messing with t.statBases.MaxHealth
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?