[REQUEST] Silver Stacking

Started by Psyckosama, March 03, 2014, 07:09:05 PM

Previous topic - Next topic

Psyckosama

Could anyone make a mod that allows you to stack silver in piles of 750 rather than 75?

Right now storing money is pretty difficult and its not really worth holding onto.

Nasikabatrachus

I've been working on a way to compress food that could be used in this way. It's only halfway finished, but I made a def and added a recipe to the blacksmith mod that takes 300 potatoes and produces a Potato crate. Here are the defs:

Code ("Recipe") Select
<RecipeDef>
<defName>MakePotatoCrate</defName>
<label>Crate 300 Potatoes</label>
<description>Packs 300 potatoes into a metal crate.</description>
<jobString>Forging.</jobString>
<workAmount>550</workAmount>
<workTimeSkillNeed>MetalBarsProcessTime</workTimeSkillNeed>
<efficiencySkillNeed>MetalBarsProcessEfficiency</efficiencySkillNeed>
<ingredients>
<li>
<filter>
<thingDefs>
<li>Metal</li>
</thingDefs>
</filter>
<count>6</count>
<filter>
<thingDefs>
<li>RawPotatoes</li>
</thingDefs>
</filter>
<count>300</count>
</li>
</ingredients>
<products>
<li>
<thingDef>PotatoCrate</thingDef>
<count>1</count>
</li>
</products>
<parentIngredientFilter>
<thingDefs>
<li>Metal</li>
</thingDefs>
</parentIngredientFilter>
<defaultIngredientFilter>
<thingDefs>
<li>RawPotatoes</li>
</thingDefs>
</defaultIngredientFilter>
</RecipeDef>


Code ("PotatoCrate") Select


<ThingDefinitions>

<ThingDef Name="DebrisBase" Abstract="True">
<eType>Debris</eType>
<category>Item</category>
<thingClass>Thing</thingClass>
<altitudeLayer>Item</altitudeLayer>
<passability>PassThroughOnly</passability>
<fillPercent>0.4</fillPercent>
<maxHealth>300</maxHealth>
<selectable>true</selectable>
<neverMultiSelect>true</neverMultiSelect>
<pathCost>55</pathCost>
<overdraw>false</overdraw>
<drawerType>MapMeshOnly</drawerType>
<naturalBuilding>true</naturalBuilding>
<randomizeRotationOnSpawn>true</randomizeRotationOnSpawn>
<designateHaulable>true</designateHaulable>
<storeCategories>
<li>Debris</li>
</storeCategories>
<dropSound>Interaction/Haul/JunkDrop</dropSound>
<saveCompressible>true</saveCompressible>
<stackLimit>1</stackLimit>
</ThingDef>


<ThingDef ParentName="DebrisBase">
<defName>PotatoCrate</defName>
<label>Potato Crate (300)</label>
<textureFolderPath>Things/Building/PotatoCrate</textureFolderPath>
<thingClass>ThingWithComponents</thingClass>
<comps>
<li><compClass>CompForbiddable</compClass></li>
</comps>
<alwaysHaulable>true</alwaysHaulable>
<storeCategories>
<li>PlantFoodRaw</li>
</storeCategories>
</ThingDef>


The biggest problem with it right now is that the potato crates show up in both the raw food and the debris categories in the stockpile list. I haven't made a recipe to reverse it, either.

If anyone wants to use these defs, please feel free. Just remember that they still need work.

Howeln

Just as an FYI, you can edit the resource xml, and change the stack of 75 to ....say 300.

Tynan

I think you could just make defs in your mod that would overwrite the core defs, but with a different stack size.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Nasikabatrachus

Heh, I was a bit too caught up in my own project to suggest the simple solution.

But yeah, here's a thing that will make it so that only silver can be stacked to 750 units. If anyone wants to make all resources have a 750 stack limit, just change both instances of "SilverBase" to "ResourceBase" in the xml.

[attachment deleted by admin: too old]

Psyckosama

#5
Quote from: Tynan on March 04, 2014, 11:43:38 PM
I think you could just make defs in your mod that would overwrite the core defs, but with a different stack size.

I actually tried that. Didn't work quite right.

It's strange, I've made a reactor mod and two crafting tables (one of which actually makes something!) but I couldn't get my silver mod to work right. :p

Quote from: Nasikabatrachus on March 05, 2014, 02:01:36 AM
Heh, I was a bit too caught up in my own project to suggest the simple solution.

But yeah, here's a thing that will make it so that only silver can be stacked to 750 units. If anyone wants to make all resources have a 750 stack limit, just change both instances of "SilverBase" to "ResourceBase" in the xml.

Suggestion, put this in the release forum. It's simple but useful.

Tynan

I'm going to start having silver stack higher. It'll take some coding but you're right that one stack limit for all items isn't appropriate.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Psyckosama

Quote from: Tynan on March 06, 2014, 04:32:31 PM
I'm going to start having silver stack higher. It'll take some coding but you're right that one stack limit for all items isn't appropriate.

Thank you, Tynan.

StorymasterQ

Can I also just ask, why 75? Why not round it up to 100 or something?

Or even make a Research (say, Efficient Stacking) that would change the stack limit from 75 to 100?
I like how this game can result in quotes that would be quite unnerving when said in public, out of context. - Myself

The dubious quotes list is now public. See it here

UrbanBourbon

Quote from: StorymasterQ on March 06, 2014, 07:57:52 PM
Can I also just ask, why 75? Why not round it up to 100 or something?

Or even make a Research (say, Efficient Stacking) that would change the stack limit from 75 to 100?
100? Ooooh, you want to do the things the eeeasy way. What are we, first-graders? No, no, no. You've got it backwards, my friend. A number like 67 would be more suitable. It feels like a fairly annoying number to handle. Also, a research project like "Alternative Bookkeeping" could change the stack size to, say, 74.

harpo99999

sorry, but the CORRECT number to start with is




43






if you do not know why, LOOK it up, perhaps even hitchhike to your local library planet  to find the answer

Vas

Quote from: Tynan on March 06, 2014, 04:32:31 PM
I'm going to start having silver stack higher. It'll take some coding but you're right that one stack limit for all items isn't appropriate.

How is it going to take some coding? :P  You just change a single value.  xD  At least, it works for me when I do it.  It just caused more glitches when I tried to make silver take a 2x2 grid.

For those here who requested Silver to be stacked higher, I present, Large Coin; http://ludeon.com/forums/index.php?topic=2537
Click to see my steam. I'm a lazy modder who takes long breaks and everyone seems to hate.


harpo99999


Nasikabatrachus

Quote from: Vas on March 14, 2014, 07:37:34 AM
Quote from: Tynan on March 06, 2014, 04:32:31 PM
I'm going to start having silver stack higher. It'll take some coding but you're right that one stack limit for all items isn't appropriate.

How is it going to take some coding? :P  You just change a single value.  xD  At least, it works for me when I do it.  It just caused more glitches when I tried to make silver take a 2x2 grid.


Probably because he's going to make pawns carry given resources up to their stacklimits; right now you can mod silver to stack at 750 but pawns will still have to make many trips to move that stack around. That's one reason my resource compression mod is going to have uranium as a store of value worth more than one full stack of silver.