Jump to content


Photo

ChangeStoreMarkup


  • Please log in to reply
13 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 03 April 2017 - 10:19 AM

How does it work? Are the values set or incremented? Are they percentages, can they be negative, are there limits... well?

 

I have this code:

 

IF
    !GlobalTimerNotExpired("INFLATION","GLOBAL")
    Global("INFLATION","GLOBAL",0)
THEN
    RESPONSE #100
        ChangeStoreMarkup("inn3351",200,200) // Feldepost's Inn
        SG("INFLATION",1)
        SetGlobalTimer("INFLATION","GLOBAL",ONE_ROUND)
END

IF
    !GlobalTimerNotExpired("INFLATION","GLOBAL")
    Global("INFLATION","GLOBAL",1)
THEN
    RESPONSE #100
        ChangeStoreMarkup("inn3351",500,500) // Feldepost's Inn
        SG("INFLATION",2)
        SetGlobalTimer("INFLATION","GLOBAL",ONE_ROUND)
END

 

Doesn't seem to change anything.

 



#2 Argent77

Argent77
  • Administrator
  • 1397 posts

Posted 03 April 2017 - 12:12 PM

This action is currently not working.



#3 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 03 April 2017 - 12:18 PM

You could use this:

///////////////////////////////////////////////////////////////////////////////
BEGIN ~The Imps store price rule and item stack amounts~ 

COPY_EXISTING_REGEXP GLOB ~.*\.sto~ ~override~
	READ_LONG 0x14 ~price~
	PATCH_IF !(price = 0) BEGIN
		WRITE_LONG 0x14 ~150~				//we set all the stores that actually sell stuff to sell them at the same rates
		WRITE_LONG 0x18 ~50~				//and buy them at a same rates too, this way if you use 3000 gold, you get a 1000 back when selling
	END
	PATCH_IF (price = 0) BEGIN
		WRITE_SHORT 0x22 ~32000~			//bags etc to contains almost unlimited, but not borged amounts of item
	END
BUT_ONLY

Adjust the 150(store's percentage profit sell price) and 50(player percentage profit sell price) to how ever you wish. PS This is permanent change...


Edited by The Imp, 03 April 2017 - 08:42 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#4 temnix

temnix
  • Member
  • 983 posts

Posted 04 April 2017 - 07:34 AM

The idea was to inflate prices over time.

 

I won't stop until I put an end to the money glut.



#5 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 04 April 2017 - 07:35 PM

@The Imp: Aurora has a component that already did the same thing long ago. We gobbled it up from GeN1e/Ardanis's "Store Prices" minimod, because he was already working on both anyway, and the latter was almost unheard of. But it's actually quite refined, even from code ages old (it allows you to choose the inflation rate, for example).

 

As for scripting inflation, it's a great idea, but perhaps still not possible? I thought we "fixed" most of these "broken" commands, but it would not be the first time I was sadly mistaken.


Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#6 temnix

temnix
  • Member
  • 983 posts

Posted 05 April 2017 - 03:57 AM

Still not working in scripts, Argent77 is right. But let me ask what else affects store prices? I know that 1) Charisma does, 2) Reputation does, 3) What else? For one thing, there is that weird little feature used everywhere, Happiness. All of the standard dialogues have that. Kagain tells you to go get him later if you need some dwarven muscle or to get bent, depending on !HappinessLT(Myself,UNHAPPY_ANGRY_BOUNDARY) and so on. That's how it's supposed to be. Does it work, though? And does happiness affect prices?

 

If not, how about this: you talk to a merchant, you instantly get a spell effect that lowers Charisma. By a scripted amount. It lasts 1 second. -1 for week 1, -2 for week 2 etc. Then effectively we could still have inflation. Possible?



#7 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 05 April 2017 - 11:00 AM

Does it work, though? And does happiness affect prices?

 

If not, how about this: you talk to a merchant, you instantly get a spell effect that lowers Charisma. By a scripted amount. It lasts 1 second. -1 for week 1, -2 for week 2 etc. Then effectively we could still have inflation. Possible?

Happiness doesn't effect prices, happiness is the personal relationship between your chars heroism, aka the party's reputation and the in party NPCs alignment, the effect can be read from the happy.2da file. -200 kicks the NPC out into a bloody rage attack towards the player char. Others just complain their existence. Well did in the old-BG2.


Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#8 temnix

temnix
  • Member
  • 983 posts

Posted 05 April 2017 - 02:16 PM

What, they don't complain anymore?

 

So does anything affect happiness except Reputation vs. alignment? And how about my idea for a Charisma penalty in a store? If I put this effect in the "Let's see what you've got" line, will the effect take hold during the dialogue, or is it all stopped while we talk?

 

Or this: patch merchants to cast a Charisma deducation to any PC who gets within 2 feet, on a global.

 

Anything else that can hike up a price?



#9 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 05 April 2017 - 08:46 PM

What, they don't complain anymore?
Yeah, to be less annoying than you are. :devil:
So does anything affect happiness except Reputation vs. alignment?
Well, the feature is not well documented, so I have no idea, but probably not.
And how about my idea for a Charisma penalty in a store? If I put this effect in the "Let's see what you've got" line, will the effect take hold during the dialogue, or is it all stopped while we talk?
Well, not on the very first Enter pass. This involves dialog constructing, and it has it's own rules, what I remember is that you should not try to include the checks for variables for two consequent response, actually you should have a room for the variable to get set... two dialog choices later you should be able to see if the variable is set.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#10 temnix

temnix
  • Member
  • 983 posts

Posted 06 April 2017 - 05:46 AM

Yes, I know that part. Supposing we could make Charisma penalties apply, how much of an effect does it have? Reputation goes up all the time usually, so what would they see at deflated Cha 5, let's say, and Rep 15? Probably not much of a reduction, especially if they cast Friends.



#11 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 06 April 2017 - 08:09 AM

Or you could be a relativistically reasonable person and just flatten out the bonus effects. The high Cha, by modifying the chrmodst.2da, and set ALL numbers to zeroes. The Reputation's file- repmodst.2da setting all the figures to 100 across the board.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#12 temnix

temnix
  • Member
  • 983 posts

Posted 06 April 2017 - 11:51 AM

Are you suggesting eliminating the effect of Reputation and Charisma? Ehhh... No, I don' think that's a good idea.



#13 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5150 posts

Posted 06 April 2017 - 09:11 PM

No, just the outrageous benefits gained from clicking ones before your barbarian talks to the shopkeeper CHR 3, that makes Imoes, who's CHR is 17 +friends + stuff do the talking... and you really think people with bad reputation, like for example from the Mod, pay with 1000% rates, right.
I am just talking what other people have done.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#14 temnix

temnix
  • Member
  • 983 posts

Posted 07 April 2017 - 06:54 AM

Imoen is charismatic and uses magic to be even more so. Perfectly logical. All in all, it's probably possible to implement inflation somehow, but it would take way too much work. No easy solution.