[A10-A15] cuproPanda's Mods (Old Thread)

Started by cuproPanda, April 23, 2015, 03:30:55 PM

Previous topic - Next topic

Mordgier

Got a build running last night with greatly increased drop rate, basically tuned chunks to 20%, split mineral yields out to be more 'interesting'. Adding additional resources will not change the rate of chunks.

Basically I do a roll to see if you get a chunk or mineral, a chunk returns while minerals goes into the loop to figure out what you get.

In order to not make minerals way too common I adjusted the yield of each down a bit, but also added a chance of getting more.
For example, you have 40% chance to get 5 pieces of steel, 9% chance of getting 25 and a 1% chance to get 50 pieces. Same thing with components etc, higher chance of getting just 1 component but also small chance of getting a larger stack. Platsteel and Uranium chance of 5 stack are now decreased with a higher chance of getting 1 piece.

I'm going to play around with it some more but so far I'm really liking the varied yields.

cuproPanda

Quote from: Mordgier on July 26, 2016, 12:06:16 PM
Got a build running last night with greatly increased drop rate, basically tuned chunks to 20%, split mineral yields out to be more 'interesting'. Adding additional resources will not change the rate of chunks.

Basically I do a roll to see if you get a chunk or mineral, a chunk returns while minerals goes into the loop to figure out what you get.

In order to not make minerals way too common I adjusted the yield of each down a bit, but also added a chance of getting more.
For example, you have 40% chance to get 5 pieces of steel, 9% chance of getting 25 and a 1% chance to get 50 pieces. Same thing with components etc, higher chance of getting just 1 component but also small chance of getting a larger stack. Platsteel and Uranium chance of 5 stack are now decreased with a higher chance of getting 1 piece.

I'm going to play around with it some more but so far I'm really liking the varied yields.

I like the idea of varied yields. See what I've done on GitHub so far, I did more work last night. I added a custom deaf so the player can adjust the things to mine, probability, and stack count. It's all under the NewSaveOnly branch of QRY
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

eskoONE

since u guys are talking about balancing the quarry i thought id share a screenshot with u guys.

http://imgur.com/a/ALFgT

in the middle of the screenshot u can see the quarry and how many chunks it produced for getting like 250 steel, 50 copper, 50 uranium, a bit gold, a bit silver, maybe 5 plasteel?! some quartz and maybe something i dont remember anymore. the amount of chunks this thing spits out is ridiculous :D id rather have it not spitting out anything than hauling the chunks all day. i dont know where to put em tbh. thats why i decided going for the oldschool method of gathering ressources and started mining on the far left :D

i was thinking, maybe instead of spitting out tons of chunks just make it spawn nothing with a text over the pawn failed to mine or something. i dont know if this is possible but u can fail crafting in this game so why not mining? u can still keep the quarry spitting out chunks but in a way that its as common as the other stuff? i dont rly know.

otherwise tyvm for putting so much time and effort into this game. u guys are awesome!

Mordgier

Quote from: eskoONE on July 26, 2016, 01:59:27 PM
since u guys are talking about balancing the quarry i thought id share a screenshot with u guys.

http://imgur.com/a/ALFgT

in the middle of the screenshot u can see the quarry and how many chunks it produced for getting like 250 steel, 50 copper, 50 uranium, a bit gold, a bit silver, maybe 5 plasteel?! some quartz and maybe something i dont remember anymore. the amount of chunks this thing spits out is ridiculous :D id rather have it not spitting out anything than hauling the chunks all day. i dont know where to put em tbh. thats why i decided going for the oldschool method of gathering ressources and started mining on the far left :D

i was thinking, maybe instead of spitting out tons of chunks just make it spawn nothing with a text over the pawn failed to mine or something. i dont know if this is possible but u can fail crafting in this game so why not mining? u can still keep the quarry spitting out chunks but in a way that its as common as the other stuff? i dont rly know.

otherwise tyvm for putting so much time and effort into this game. u guys are awesome!

Once I'm home I'll post the compiled dll that's a direct replacement for the current quarry.dll file which will spawn only 20% chunks.

I don't want to fully turn chunks off as there is a legitimate use for them.

cuproPanda

Quote from: eskoONE on July 26, 2016, 01:59:27 PM
since u guys are talking about balancing the quarry i thought id share a screenshot with u guys.

http://imgur.com/a/ALFgT

in the middle of the screenshot u can see the quarry and how many chunks it produced for getting like 250 steel, 50 copper, 50 uranium, a bit gold, a bit silver, maybe 5 plasteel?! some quartz and maybe something i dont remember anymore. the amount of chunks this thing spits out is ridiculous :D id rather have it not spitting out anything than hauling the chunks all day. i dont know where to put em tbh. thats why i decided going for the oldschool method of gathering ressources and started mining on the far left :D

i was thinking, maybe instead of spitting out tons of chunks just make it spawn nothing with a text over the pawn failed to mine or something. i dont know if this is possible but u can fail crafting in this game so why not mining? u can still keep the quarry spitting out chunks but in a way that its as common as the other stuff? i dont rly know.

otherwise tyvm for putting so much time and effort into this game. u guys are awesome!

Yeah that's not supposed to happen. I'm still in the process of fixing errors (and creating new ones to fix), but the new version will have a 60% chance to get "junk", then another check of what type of junk to get. 40% chance to get chunks, and a 60% chance to get rock rubble, which doesn't need to be hauled away. That way, it should be closer to digging through random mountains. Plus, all the chances are changeable in xml, so you'll be able to have a quarry spit out nothing but gold all day long if you really wanted to ;)

If the quarry could drop it's contents on the quadrants like in A13, I'd love to be able to create a small event where a quadrant contained a vein of ore, then for the next 3-6 mining jobs only that ore was mined.
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

cuproPanda

#470
I think I've fixed all the issues, and I'm going to do some more thorough testing for tonight before I make a thread asking for help testing it with a variety of mods. You can get the newest version (below comment), but I highly recommend you use it with a new save game. It is definitely not compatible with the older versions of the quarry mod, at least.

Also, there may be errors. I haven't found any, but be warned.
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Drusek

Im testing it and mining something called Conglomerate - no idea what to do with it.

cuproPanda

Quote from: Drusek on July 26, 2016, 05:50:24 PM
Im testing it and mining something called Conglomerate - no idea what to do with it.

It should automatically destroy itself and drop a random resource - it's not?
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Drusek

Had only Fluffy's Work Tab after Quarry. Moved Quarry to the bottom and now it spawns resources instead of that Conglomerate.

cuproPanda

Quote from: Drusek on July 26, 2016, 06:10:41 PM
Had only Fluffy's Work Tab after Quarry. Moved Quarry to the bottom and now it spawns resources instead of that Conglomerate.

Interesting. I'll install that mod and see if I can't work around the issue. Thank you
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Hanekem

Hi, just started playing with your mods and... well, I think I screwed myself, my map lacks Sand, so no glass and no sandbags (perhaps dirt could be used as a substitute for sand?) so, unless I am missing an alternate way of generating sand, this means the only worthy maps are coasts.

Is this Working as Intended?

Drusek

You can turn gravel into sand at stonecutters tables. Im not sure if every map has gravel but if not then you can turn chunks to gravel.

cuproPanda

Unifier is now updated!



Quote from: Hanekem on July 26, 2016, 06:25:58 PM
Hi, just started playing with your mods and... well, I think I screwed myself, my map lacks Sand, so no glass and no sandbags (perhaps dirt could be used as a substitute for sand?) so, unless I am missing an alternate way of generating sand, this means the only worthy maps are coasts.

Is this Working as Intended?

I'm guessing I need to state that somewhere in the mod. A lot of people are confused by this.
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Hanekem

Quote from: Drusek on July 26, 2016, 06:32:01 PM
You can turn gravel into sand at stonecutters tables. Im not sure if every map has gravel but if not then you can turn chunks to gravel.

That is still behind research, there should, perhaps, be a less efficient but quick access Production furniture to close the gap...
Quote from: cuproPanda on July 26, 2016, 06:35:33 PM
Unifier is now updated!



Quote from: Hanekem on July 26, 2016, 06:25:58 PM


I'm guessing I need to state that somewhere in the mod. A lot of people are confused by this.

That'd be great. I know that figure it by yourself is kinda big on Dorf clones, but sometimes one gets rather lost....

Mordgier

#479
Quote from: Mordgier on July 26, 2016, 02:41:06 PM
Quote from: eskoONE on July 26, 2016, 01:59:27 PM
since u guys are talking about balancing the quarry i thought id share a screenshot with u guys.

http://imgur.com/a/ALFgT

in the middle of the screenshot u can see the quarry and how many chunks it produced for getting like 250 steel, 50 copper, 50 uranium, a bit gold, a bit silver, maybe 5 plasteel?! some quartz and maybe something i dont remember anymore. the amount of chunks this thing spits out is ridiculous :D id rather have it not spitting out anything than hauling the chunks all day. i dont know where to put em tbh. thats why i decided going for the oldschool method of gathering ressources and started mining on the far left :D

i was thinking, maybe instead of spitting out tons of chunks just make it spawn nothing with a text over the pawn failed to mine or something. i dont know if this is possible but u can fail crafting in this game so why not mining? u can still keep the quarry spitting out chunks but in a way that its as common as the other stuff? i dont rly know.

otherwise tyvm for putting so much time and effort into this game. u guys are awesome!

Once I'm home I'll post the compiled dll that's a direct replacement for the current quarry.dll file which will spawn only 20% chunks.

I don't want to fully turn chunks off as there is a legitimate use for them.

Attached is the direct replacement for the 'legacy' version of the mod - the version published on steam. This should reduce chunks to 20%.


Just replace your Quarry.dll from the mod with this one. Actual code changed below - Note the % values are probably HIGHER than the comments if you do not have other metals!
        // Randomly determine the resource, then tell
        // SpawnProduct() what to spawn and how much
        public void GenProduct()
        {
            int tmp = Rand.RangeInclusive(1, 200);

            do
            {
                if (tmp < 40 )  { //20% chunks
                    isChunk = true;
                    SpawnProduct(chunk, 1);
                    return;
                }


                if (tmp >= 40 && tmp < 45)
                {// 5
                    if (DefDatabase<ThingDef>.GetNamed("CP_Copper", false) != null)
                    {
                        SpawnProduct(ThingDef.Named("CP_Copper"), 10);
                        return;
                    }

                }
                if (tmp >= 45 && tmp < 50)
                {// 5
                    if (DefDatabase<ThingDef>.GetNamed("CP_Quartz", false) != null)
                    {
                        SpawnProduct(ThingDef.Named("CP_Quartz"), 10);
                        return;
                    }
                }
                if (tmp == 50)
                {// 1
                    if (DefDatabase<ThingDef>.GetNamed("CAL_RoseGold", false) != null)
                    {
                        SpawnProduct(ThingDef.Named("CAL_RoseGold"), 5);
                        return;
                    }

                }
                if (tmp >= 51 && tmp < 55)
                {// 4
                    if (DefDatabase<ThingDef>.GetNamed("POW_Coldstone", false) != null)
                    {
                        SpawnProduct(ThingDef.Named("POW_Coldstone"), 1);
                        return;
                    }

                }
                if (tmp >= 55 && tmp < 60)
                {// 5
                    if (DefDatabase<ThingDef>.GetNamed("Aluminium", false) != null)
                    {
                        SpawnProduct(ThingDef.Named("Aluminium"), 10);
                        return;
                    }
                }
                if (tmp >= 60 && tmp < 65)
                {// 5
                    if (DefDatabase<ThingDef>.GetNamed("Copper", false) != null)
                    {
                        SpawnProduct(ThingDef.Named("Copper"), 10);
                        return;
                    }
                }
                if (tmp >= 65 && tmp < 70)
                {// 5
                    if (DefDatabase<ThingDef>.GetNamed("MD2Coal", false) != null)
                    {
                        SpawnProduct(ThingDef.Named("MD2Coal"), 5);
                        return;
                    }

                }
                if (tmp >= 70 && tmp < 74)
                {// 4
                    if (DefDatabase<ThingDef>.GetNamed("POW_Glowstone", false) != null)
                    {
                        SpawnProduct(ThingDef.Named("POW_Glowstone"), 1);
                        return;
                    }

                }
                if (tmp >= 74 && tmp < 114) //20% 5 steel
                {// 12
                    SpawnProduct(ThingDefOf.Steel, 5);
                    return;
                }
                if (tmp >= 114 && tmp < 132) //9% 20 steel
                {// 12
                    SpawnProduct(ThingDefOf.Steel, 20);
                    return;
                }
                if (tmp >= 132 && tmp < 134) //1% 50 steel
                {// 12
                    SpawnProduct(ThingDefOf.Steel, 50);
                    return;
                }
                if (tmp >= 134 && tmp < 154) //10% 5 silver
                {// 6
                    SpawnProduct(ThingDefOf.Silver, 5);
                    return;
                }
                if (tmp >= 154 && tmp < 164) //5% 10 silver
                {// 6
                    SpawnProduct(ThingDefOf.Silver, 10);
                    return;
                }
                if (tmp >= 164 && tmp < 166) //1% 20 silver
                {// 6
                    SpawnProduct(ThingDefOf.Silver, 20);
                    return;
                }
                if (tmp >= 166 && tmp < 175) //5% 10 Jad
                {// 3
                    SpawnProduct(ThingDef.Named("Jade"), 10);
                    return;
                }
                if (tmp >= 175 && tmp < 177) //1% 30 Jad
                {// 3
                    SpawnProduct(ThingDef.Named("Jade"), 30);
                    return;
                }
                if (tmp >= 177 && tmp < 187) //5% 10 Gold
                {// 3
                    SpawnProduct(ThingDefOf.Gold, 10);
                    return;
                }
                if (tmp >= 187 && tmp < 189) //1% 30 Gold
                {// 3
                    SpawnProduct(ThingDefOf.Gold, 30);
                    return;
                }
                if (tmp >= 187 && tmp >= 189) //1% 1 Uranium
                {// 2
                    SpawnProduct(ThingDef.Named("Uranium"), 1);
                    return;
                }
                if (tmp >= 189 && tmp >= 191) //1% 1 Platsteel
                {// 1
                    SpawnProduct(ThingDefOf.Plasteel, 1);
                    return;
                }
                if (tmp >= 191 && tmp < 195) //2% 1 component
                {// 3
                    SpawnProduct(ThingDefOf.Component, 1);
                    return;
                }
                if (tmp == 195) //.5% 5 component
                {// 3
                    SpawnProduct(ThingDefOf.Component, 5);
                    return;
                }
                if (tmp == 197) //.5% 5 Platsteel
                {// 1
                    SpawnProduct(ThingDefOf.Plasteel, 5);
                    return;
                }
                if (tmp == 198) //.5% 10 Uranium
                {// 1
                    SpawnProduct(ThingDef.Named("Uranium"), 10);
                    return;
                }
                if (tmp == 199) //.5% 100 Silver
                {// 1
                    SpawnProduct(ThingDefOf.Silver, 100);
                    return;
                }
                if (tmp == 200) //.5% 10 Plasteel
                {// 1
                    SpawnProduct(ThingDefOf.Plasteel, 10);
                    return;
                }
                tmp = Rand.RangeInclusive(1, 200); //roll again
        }while (true); //do this forever until you breakout via a return.
    }


[attachment deleted by admin - too old]