[Request] CS Coding I'm looking for

Discussion in 'Released Mods' started by DraLUSAD, Jan 3, 2013.

  1. DraLUSAD Snow Flinx

    Hello everyone, I'm Looking for CS Codes, to help/Supply Certain Coding for my Mod, which can be found here
    http://www.terrariaonline.com/threads/release-wip-industrial-age-mod.94737/

    I've Tried Looking through Interesting and Clever Mod titles, but some Require Multiple CS Changes, which I Dont have the Knowledge of yet, I'm just stuck to one single CS Coding, biggest Successtion i've do so fair is this

    Code:
    public void ModifyWorld()
    {
          Main.statusText = "Adding Tin Ore..."; //feel free to tweak
          int Amount_Of_Spawns = 600+(int)(Main.maxTilesY/6); //feel free to tweak
          for(int i=0;i<Amount_Of_Spawns;i++) AddTinOre();
     
          Main.statusText = "Adding Coal..."; //feel free to tweak
          int Amount_Of_Spawns2 = 800+(int)(Main.maxTilesY/10); //feel free to tweak
          for(int j=0;j<Amount_Of_Spawns2;j++) AddCoal();
     
          Main.statusText = "Adding Uranium Ore..."; //feel free to tweak
          int Amount_Of_Spawns3 = 200+(int)(Main.maxTilesY/5); //feel free to tweak
          for(int d=0;d<Amount_Of_Spawns3;d++) AddUraniumOre();
     
          Main.statusText = "Adding Tungsten Ore..."; //feel free to tweak
          int Amount_Of_Spawns4 = 100+(int)(Main.maxTilesY/2); //feel free to tweak
          for(int a=0;a<Amount_Of_Spawns4;a++) AddTungstenOre();
     
          Main.statusText = "Adding Graval..."; //feel free to tweak
          int Amount_Of_Spawns5 = 600+(int)(Main.maxTilesY/5); //feel free to tweak
          for(int b=0;b<Amount_Of_Spawns5;b++) AddGraval();
     
    }
    public void AddTinOre()
    {
        int LowX = 200;                    //after ocean on left edge of map
        int HighX = Main.maxTilesX-200;    //before ocean on right edge of map
        int LowY = (int)Main.worldSurface;  //where the brown background and the sky background meets
        int HighY = Main.maxTilesY-200;    //where hell and the grey background meets
       
        int X = WorldGen.genRand.Next(LowX,HighX); //don't touch
        int Y = WorldGen.genRand.Next(LowY,HighY); //don't touch
     
        int OreMinimumSpread = 3; //feel free to tweak
        int OreMaximumSpread = 8; //feel free to tweak
     
        int OreMinimumFrequency = 5; //feel free to tweak
        int OreMaximumFrequency = 10; //feel free to tweak
     
        int OreSpread = WorldGen.genRand.Next(OreMinimumSpread,OreMaximumSpread+1); //don't touch
        int OreFrequency = WorldGen.genRand.Next(OreMinimumFrequency,OreMaximumFrequency+1); //don't touch
     
        WorldGen.OreRunner(X, Y, (double)OreSpread, OreFrequency, Config.tileDefs.ID["Tin Ore"]);
    }
    public void AddCoal()
    {
        int LowX = 200;                    //after ocean on left edge of map
        int HighX = Main.maxTilesX-200;    //before ocean on right edge of map
        int LowY = (int)Main.worldSurface;  //where the brown background and the sky background meets
        int HighY = Main.maxTilesY-200;    //where hell and the grey background meets
       
        int X = WorldGen.genRand.Next(LowX,HighX); //don't touch
        int Y = WorldGen.genRand.Next(LowY,HighY); //don't touch
     
        int OreMinimumSpread = 6; //feel free to tweak
        int OreMaximumSpread = 12; //feel free to tweak
     
        int OreMinimumFrequency = 6; //feel free to tweak
        int OreMaximumFrequency = 12; //feel free to tweak
     
        int OreSpread = WorldGen.genRand.Next(OreMinimumSpread,OreMaximumSpread+1); //don't touch
        int OreFrequency = WorldGen.genRand.Next(OreMinimumFrequency,OreMaximumFrequency+1); //don't touch
     
        WorldGen.OreRunner(X, Y, (double)OreSpread, OreFrequency, Config.tileDefs.ID["Coal"]);
    }
    public void AddUraniumOre()
    {
        int LowX = 200;                    //after ocean on left edge of map
        int HighX = Main.maxTilesX-200;    //before ocean on right edge of map
        int LowY = (int)Main.worldSurface;  //where the brown background and the sky background meets
        int HighY = Main.maxTilesY-200;    //where hell and the grey background meets
       
        int X = WorldGen.genRand.Next(LowX,HighX); //don't touch
        int Y = WorldGen.genRand.Next(LowY,HighY); //don't touch
     
        int OreMinimumSpread = 2; //feel free to tweak
        int OreMaximumSpread = 5; //feel free to tweak
     
        int OreMinimumFrequency = 2; //feel free to tweak
        int OreMaximumFrequency = 3; //feel free to tweak
     
        int OreSpread = WorldGen.genRand.Next(OreMinimumSpread,OreMaximumSpread+1); //don't touch
        int OreFrequency = WorldGen.genRand.Next(OreMinimumFrequency,OreMaximumFrequency+1); //don't touch
     
        WorldGen.OreRunner(X, Y, (double)OreSpread, OreFrequency, Config.tileDefs.ID["Uranium Ore"]);
    }
    public void AddTungstenOre()
    {
        int LowX = 200;                    //after ocean on left edge of map
        int HighX = Main.maxTilesX-200;    //before ocean on right edge of map
        int LowY = (int)Main.worldSurface;  //where the brown background and the sky background meets
        int HighY = Main.maxTilesY-200;    //where hell and the grey background meets
       
        int X = WorldGen.genRand.Next(LowX,HighX); //don't touch
        int Y = WorldGen.genRand.Next(LowY,HighY); //don't touch
     
        int OreMinimumSpread = 2; //feel free to tweak
        int OreMaximumSpread = 5; //feel free to tweak
     
        int OreMinimumFrequency = 2; //feel free to tweak
        int OreMaximumFrequency = 3; //feel free to tweak
     
        int OreSpread = WorldGen.genRand.Next(OreMinimumSpread,OreMaximumSpread+1); //don't touch
        int OreFrequency = WorldGen.genRand.Next(OreMinimumFrequency,OreMaximumFrequency+1); //don't touch
     
        WorldGen.OreRunner(X, Y, (double)OreSpread, OreFrequency, Config.tileDefs.ID["Tungsten Ore"]);
    }
    public void AddGraval()
    {
        int LowX = 200;                    //after ocean on left edge of map
        int HighX = Main.maxTilesX-200;    //before ocean on right edge of map
        int LowY = (int)Main.worldSurface;  //where the brown background and the sky background meets
        int HighY = Main.maxTilesY-200;    //where hell and the grey background meets
       
        int X = WorldGen.genRand.Next(LowX,HighX); //don't touch
        int Y = WorldGen.genRand.Next(LowY,HighY); //don't touch
     
        int OreMinimumSpread = 5; //feel free to tweak
        int OreMaximumSpread = 10; //feel free to tweak
     
        int OreMinimumFrequency = 5; //feel free to tweak
        int OreMaximumFrequency = 10; //feel free to tweak
     
        int OreSpread = WorldGen.genRand.Next(OreMinimumSpread,OreMaximumSpread+1); //don't touch
        int OreFrequency = WorldGen.genRand.Next(OreMinimumFrequency,OreMaximumFrequency+1); //don't touch
     
        WorldGen.OreRunner(X, Y, (double)OreSpread, OreFrequency, Config.tileDefs.ID["Graval"]);
    }
    But I'm looking for More Coding to Change even more of the Games Aspects.


    1st - I'm looking for the CS Coding which Changes how Life Crystal Work, as i would like to Decrease the Gain From "20" to "10" and the Life Cap from "400" to "600"

    2nd - I'm Looking for the CS Coding which Changes how Mana Crystals Work, as i also would like to Decrease the Gain from "20" to "5" and the Cap (If possible) from "200" to "300"

    3rd - I'm looking into Increasing the Accessories Slots from "5" to "8" (Even 10, if you will, but 8 is diffidently a good Number)

    4th - Turning Many Buff Power's into Accessories and Armours

    These are proberbly what am Looking from, Mainly the first 3, but the 4th is Diffidently a Bonus

    Thank you.
  2. Empio Blazing Wheel

    1 and 2
    You can look at my Experience mod.
    Look in Item.cs, it contains code for checking if the item used is a life crystal or mana crystal.
    You can do your own processing in there.

    3
    Check out Yoraiz0r's interface guide on the tConfig Wiki.
    You'll have to write some code in ModPlayer.PreUpdatePlayer or ModPlayer.UpdatePlayer to process the effects of the items equipped to those slots.

    4
    Simple enough, you'll either have to go trudging through the decompiled source code of Terraria or write your own.
    It shouldn't be hard to write your own.

    People won't just give you code, or write it on a whim for you.
    If you really want to make mods, you'll either have to learn to code yourself or form a team with a programmer.
  3. Yoraiz0r The Wizard

    Let me correct you on 3 and 4

    3. Shockah already made a mod which lets you equip up to 6 more accessories (there's a version that also lets you have just 3 more , effectively gaining your desired number , 8) - he just updated this mod like 4 hours ago too!

    4. its super simple to take buffs and turn them into accessories , just look at the mods around the forums and you'll see :D
  4. DraLUSAD Snow Flinx

    Had alook at that and thought "looks Good", Dumped it into "Item" (As i think it does) and it went... CRAZY... saying something about "Modworld" doesn't exist?

    [IMG]



    I'm Looking for CS Coding to add to my own Mod, and not "obj" Files, this sounds as though i dont want to use anyone else's mod, But, I just Prefer Compiling my own CS Files from Codes people have already used... in which case, I'll be able to get more Knowledge, and eventually, Compiling my own CS Coding, For now though, just looking for people who knows CS coding and Hoping they can share the Wealth of Knowledge with me :)
  5. Yoraiz0r The Wizard

    obj files are zip containers , suprise! now open them up and look at the cs files inside. ._.
    as for 'get more knowledge' , you just said you DUMPED THE FILES INTO YOUR MOD , did you even read the code and adjust it to match your needs?
  6. Empio Blazing Wheel

    For my code, I meant for you to write your own handling if item.type == CrystalType.
    Get rid of all the ModWorld and PlayersAttributes stuff.

    Obj files are just zip files. They should have the source code inside them.
    Yoraiz0r likes this.
  7. DraLUSAD Snow Flinx

    No :(, Coding is very Complicated to me, thats the Probelm

    And I'll have a Bash at that unziping them though

    Oh, I see

Share This Page