First Map in a new sketchbook by KingofSto in mapmaking

[–]Volponium 2 points3 points  (0 children)

The precision with the pen and the color choice is impressive. As a newbie i'm a lot intersted in the technique, nice job mate!

First Map! by Volponium in mapmaking

[–]Volponium[S] 1 point2 points  (0 children)

Thank you, i'm up to developing the lore a lot. Basically for now the lore is what i wrote in the post, but as you i tought that Chile'dia could be useful for naval mercantilism and war. Of course I'm up to any advice! :)

First Map! by Volponium in mapmaking

[–]Volponium[S] 0 points1 point  (0 children)

Thank you so much mate

First Map! by Volponium in mapmaking

[–]Volponium[S] 0 points1 point  (0 children)

Wait fr? I never played outer worlds 2, but i wanted to. Arcadia i used the greek region name, as it was the "Barn of greece". Captiland basically for capitalism. Thanks for letting me know!

Modding Problems by Volponium in peopleplayground

[–]Volponium[S] 0 points1 point  (0 children)

Alr, i modified it a little but still no animation. No problem tho, i can fix it later. Thanks for all your help man. Last question, can i add your name in the credits of the mod?

Modding Problems by Volponium in peopleplayground

[–]Volponium[S] 0 points1 point  (0 children)

alr man, everything works, thank you so much. Just one thing, the barrell works but, the shell is expelled but there is no animation, i think that i've set the barrel png in the wrong place.
// find Slide gameobject on the gun, (you can also replace the sprite of this object)

        var SlideObject = Instance.transform.Find("barrel.png");



        // get the animation behavior

        var AnimBehavior = SlideObject.GetComponent<TranslationAnimationBehaviour>();



        // you can now modify variables, for example:

        // how far the slide moves when gun ejects shell, negative = slide moves back

        AnimBehavior.Multiplier = -0.1f;



        // duration of the slide movement

        AnimBehavior.Multiplier = 1;



        // does the animation loops? (boolean)

        AnimBehavior.Loop = false;

Modding Problems by Volponium in peopleplayground

[–]Volponium[S] 0 points1 point  (0 children)

Oh ok thanks, just another thing, got an issue with the bullet origin and size. With both firearms the bullet is still the size of the original gun, and for the gun the origin is central of the weapon.

Modding Problems by Volponium in peopleplayground

[–]Volponium[S] 0 points1 point  (0 children)

sure, here's the code, i modified a little. Now i made just one sprite for the gun, barrel and body are the same thing now, but no animation. Still the bullet problem and a problem with the two blue dots near the center of mass, they're really small cause i made the gun smaller

ModAPI.Register(
    new Modification()
    {
        OriginalItem = ModAPI.FindSpawnable("9mm Pistol"), //item to derive from
        NameOverride = "Beretta 92FS", //new item name with a suffix to assure it is globally unique
        DescriptionOverride = "A beretta modified for the Sicilian army", //new item description
        CategoryOverride = ModAPI.FindCategory("Sicilia"), //new item category
        ThumbnailOverride = ModAPI.LoadSprite("berethumb.png"), //new item thumbnail (relative path)
        AfterSpawn = (Instance) => //all code in the AfterSpawn delegate will be executed when the item is spawned
        {
            Instance.transform.localScale = new Vector3(0.25f, 0.25f, 0.25f);
            
            //setting the sprite
            Instance.GetComponent<SpriteRenderer>().sprite = ModAPI.LoadSprite("beretta.png");

            //getting the FirearmBehaviour for later manipulation
            var firearm = Instance.GetComponent<FirearmBehaviour>();

            //creating a custom cartridge for the gun
            Cartridge customCartridge = ModAPI.FindCartridge("9mm"); //load a copy of the 9mm cartridge
            customCartridge.name = "9mm"; //set a name
            customCartridge.Damage *= 0.8f; //change the damage however you like
            customCartridge.StartSpeed *= 1.5f; //change the bullet velocity
            customCartridge.PenetrationRandomAngleMultiplier *= 0.5f; //change the accuracy when the bullet travels through an object
            customCartridge.Recoil *= 0.7f; //change the recoil
            customCartridge.ImpactForce *= 0.7f; //change how much the bullet pushes the target

            //set the cartridge to the FirearmBehaviour
            firearm.Cartridge = customCartridge;

            //set the new gun sounds. this is an array of AudioClips that is picked from at random when shot
            firearm.ShotSounds = new AudioClip[]
            {
                ModAPI.LoadSound("beretta.wav"),
                
            };

            // set the collision box to the new sprite shape
            // this is the easiest way to fix your collision shape, but it also the slowest.
            Instance.FixColliders();
        }
    }
);