Jump to content

Making a rent system


heat465

Recommended Posts

I'm making an apartment mod where the user can rent an apartment but will have to pay x amount of caps each week in order to keep living there. I'm not sure how I would set up a system to check which day is the day they should pay, how to check if they actually paid for their rent (I plan on having a box outside of the door where they can put their caps in), and how to set up the consequences that will happen if they don't pay on time (i.e. getting kicked out of the apartment, having someone come to "collect" your caps, etc.) Can anyone give me a basic idea on how I can make this system work?

Link to comment
Share on other sites

That sounds pretty interesting ... and to implement it I think your going to need a quest ... and utilize its stages / objectives

 

something like this.... ?

 

Player talks to LandLord and it initiates a quest. This quest then starts keeping track of the "rent is paid" variable.

 

If that variable becomes unpaid status ... the quest initiates other scripts to send leg breakers after you ... ?

 

Is that what you are looking for ?

Edited by Mktavish
Link to comment
Share on other sites

That sounds pretty interesting ... and to implement it I think your going to need a quest ... and utilize its stages / objectives

 

something like this.... ?

 

Player talks to LandLord and it initiates a quest. This quest then starts keeping track of the "rent is paid" variable.

 

If that variable becomes unpaid status ... the quest initiates other scripts to send leg breakers after you ... ?

 

Is that what you are looking for ?

I could try to do it this way, but I still wouldn't know how to track which day that the player starts to rent the apartment, not to mention how to check when a week passes to check whether they have paid or not.

Link to comment
Share on other sites

You're going to need some scripting.


The game has a global variable called GameDaysPassed which tracks the number of in-game days the player has been playing for. You can check a week has passed by saving the initial state of the global to a script variable when the player gets the house, then check whether GameDaysPassed >= [yourLocalVar] + 7.

float fGameDays

if (GameDaysPassed >= fGameDays + 7)

	let fGameDays := GameDaysPassed

	;rent time!

endif

If the player doesn't pay their rent in time then just lock the house and enable a note on the door or something.

Edited by PushTheWinButton
Link to comment
Share on other sites

You're going to need some scripting.

The game has a global variable called GameDaysPassed which tracks the number of in-game days the player has been playing for. You can check a week has passed by saving the initial state of the global to a script variable when the player gets the house, then check whether GameDaysPassed >= [yourLocalVar] + 7.

float fGameDays

if (GameDaysPassed >= fGameDays + 7)

	let fGameDays := GameDaysPassed

	;rent time!

endif

If the player doesn't pay their rent in time then just lock the house and enable a note on the door or something.

Just curious, does that require NVSE to work? I'm not too sure since I looked up what that operator meant and it was listed with other NVSE expressions.

Link to comment
Share on other sites

 

You're going to need some scripting.

 

 

The game has a global variable called GameDaysPassed which tracks the number of in-game days the player has been playing for. You can check a week has passed by saving the initial state of the global to a script variable when the player gets the house, then check whether GameDaysPassed >= [yourLocalVar] + 7.

float fGameDays

if (GameDaysPassed >= fGameDays + 7)

	let fGameDays := GameDaysPassed

	;rent time!

endif
If the player doesn't pay their rent in time then just lock the house and enable a note on the door or something.
Just curious, does that require NVSE to work? Â I'm not too sure since I looked up what that operator meant and it was listed with other NVSE expressions.

No. GameDaysPassed is vanilla.

Link to comment
Share on other sites

 

 

You're going to need some scripting.

 

 

The game has a global variable called GameDaysPassed which tracks the number of in-game days the player has been playing for. You can check a week has passed by saving the initial state of the global to a script variable when the player gets the house, then check whether GameDaysPassed >= [yourLocalVar] + 7.

float fGameDays

if (GameDaysPassed >= fGameDays + 7)

	let fGameDays := GameDaysPassed

	;rent time!

endif
If the player doesn't pay their rent in time then just lock the house and enable a note on the door or something.
Just curious, does that require NVSE to work? Â I'm not too sure since I looked up what that operator meant and it was listed with other NVSE expressions.

No. GameDaysPassed is vanilla.

 

I meant the := expression and "let", if I try saving my script it returns an error with it not know what it is.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...