tModLoader Capitalism

  • Fixed possible crash.
  • Fixed item buybacks erroneously adding to item markup.
Edit: v1.0.9 quietly pushed to add more failsafes:
 

Attachments

  • Capitalism v1.0.9.zip
    11.6 KB · Views: 209
Last edited:
  • Modified the formula to the following (v=item's base value, t=total purchases):
    • v + (v * t * 0.1 * (0.996 ^ t))
  • More fixes.
 

Attachments

  • Capitalism v1.1.1.zip
    13.1 KB · Views: 183
After some extensive testing, I found this mod (Whether with other mods or just by itself, I assume the prior) can have the game simply not allow player input besides the mouse.
I'm not sure if that's a fixable issue due to some of the mods I was using being D-List in popularity to say the least, but I thought I'd bring the issue up.
 
After some extensive testing, I found this mod (Whether with other mods or just by itself, I assume the prior) can have the game simply not allow player input besides the mouse.
I'm not sure if that's a fixable issue due to some of the mods I was using being D-List in popularity to say the least, but I thought I'd bring the issue up.
Can you tell me if your log file gives a report (Documents/My Games/Terraria/ModLoader/Logs)? This bug has been recurrent, but I've been unable to replicate it.

Edit: Here's a new version with as many reasonable failsafes as I can currently think to add. I did find a few likely problem areas, so this ought to eliminate your hard lock.

Sorry for the trouble, but since tML does not (yet) have proper buy and sell hooks (and because of my limited computing setup), this is my best effort. Should work now.

Edit:
v1.1.6

  • Fixed config reloading between game sessions.
 

Attachments

  • Capitalism v1.1.5.zip
    13.3 KB · Views: 234
  • Capitalism v1.1.6.zip
    13.3 KB · Views: 171
Last edited:
maybe add a banking system or investing system ? So you can really feel more capitalistic
[doublepost=1485033341,1485033192][/doublepost]
maybe add a banking system or investing system ? So you can really feel more capitalistic
No offence but this mod seems to sometimes just be bug fixed stacked untop of each other
 
Can you tell me if your log file gives a report (Documents/My Games/Terraria/ModLoader/Logs)? This bug has been recurrent, but I've been unable to replicate it.

Edit: Here's a new version with as many reasonable failsafes as I can currently think to add. I did find a few likely problem areas, so this ought to eliminate your hard lock.

Sorry for the trouble, but since tML does not (yet) have proper buy and sell hooks (and because of my limited computing setup), this is my best effort. Should work now.

Unfortunately there was no specific logs to say anything about it, it was just a hard lock to which I assume was because there was other mods and some of the mods' NPCs code may have clashed in a way with the Capitalism source, or something? I dunno technical stuff, I'm just probably talkin' out my bum. I'll give the hotfix a try when I boot my Terraria back up, though.
 
v1.2.0
  • Updated config file location.
  • Cleaned up some code.
  • Smoothed out price markup decay for expensive items.
  • Added price markups for female townsfolk during a blood moon.
  • Added price reduction for lovestruck townsfolk of the opposite gender.
  • Added price markup for stinky players.
Also, source code now available.
 

Attachments

  • Capitalism v1.2.0.zip
    14.4 KB · Views: 182
%:sigh:

Note also this gives Gender Change Potions a gameplay use, now. Bit of an unintended side effect...


Honestly, probably not. I feel that's a bit beyond the scope I'm aiming for.
Sad thats what I was hoping for this would become but thanks for the mod anyway
 
Sad thats what I was hoping for this would become but thanks for the mod anyway
I mean, I could... I'd create a banker NPC and then you can store away money you can't use to gain interest until a future point. Then like a real bank I could make increasingly unreasonable demands of the player, holding their savings hostage until it becomes far more trouble than it was ever worth, culminating in complete enslavement and being inducted into the next iteration of the lunatic cult after destroying the original, only for the cycle to repeat with a new character with your old one as the cultist leader.

How would investing even work, though? There'd have to be an economy of some kind other than the player's own buying and selling.
 
I mean, I could... I'd create a banker NPC and then you can store away money you can't use to gain interest until a future point. Then like a real bank I could make increasingly unreasonable demands of the player, holding their savings hostage until it becomes far more trouble than it was ever worth, culminating in complete enslavement and being inducted into the next iteration of the lunatic cult after destroying the original, only for the cycle to repeat with a new character with your old one as the cultist leader.

How would investing even work, though? There'd have to be an economy of some kind other than the player's own buying and selling.
more like you could lent or store money for later use to not plunder when shopping and if you dont pay back your checks a insta kill enemy will kill you and take the funds from you in items :3
 
Last version, for now. At least until a sell hook exists in tML, maybe:

v1.2.2
  • Altered some default config values
  • Changed markup formula (b=base value, t=total purchases, s=total spendings):
    b + ( b * t * 0.02 * (0.996 ^ ((t/4) + (s/10000))) )
Mirror
 

Attachments

  • Capitalism v1.2.2.zip
    27.2 KB · Views: 200
How would investing even work, though? There'd have to be an economy of some kind other than the player's own buying and selling.

Depends on how complex you'd want to make it. Aside from a purely random chance of making a profit/loss, here's my 3 cents:

You invest in an NPC. If the NPC dies, your investment obviously went down the drain. Gives more incentive to protect your NPCs.
Traveling merchants that compete with existing NPCs, and trade with others. Faking some economy from random values.
Allow multiple of the same NPC, such that your existing framework leave the player with options with varying prices depending on trade.

No idea about the feasibility of any of those...
 
v1.3.0
  • New formula for item markup (b=base value, t=total purchases): b + ( (b * t)^0.8 ) / 50
  • Fixed semi-critical bulk purchases bug
Edit:

v1.3.1
  • (Minor?) logic correction for bulk purchase detection
Edit x 2:

v1.3.2.1
  • Added config setting 'Enabled' (allows disabling the mod instead of unloading it)
  • Added shop prices markup % indicators as item tooltips
 

Attachments

  • Capitalism v1.3.1.zip
    27.3 KB · Views: 180
  • Capitalism v1.3.2.1.zip
    27.5 KB · Views: 169
Last edited:
Back
Top Bottom