Jump to content

Recommended Posts

Posted

Hey guys,

 

I want to modify the food bar. Right now, it's simply a value out of 20- in my opinion that really doesn't give us much creative freedom.

So, I want to boost that limit to say, 100.

 

Is something like this possible? Would I need to use ASM/Reflection or is there something clever I can do? I've never done anything like that before, how complicated is it considering I'm only really changing an integer (and I suppose potentially the bar's rendering; but we'll cross that bridge later and ignore it for now)

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Posted

Hi

 

What do you really want to do with the food bar?  Do you want the player to be able to eat more, or do you just want finer control / display of the food level?

 

You could probably use ASM & Reflection to modify FoodStats to store a float internally instead of an integer, and allow you to take small fractions of food bar away.

 

To be honest it at the moment it sounds like a lot of trouble for not much gain?

 

-TGG

 

 

 

 

Posted

Hi

 

What do you really want to do with the food bar?  Do you want the player to be able to eat more, or do you just want finer control / display of the food level?

 

You could probably use ASM & Reflection to modify FoodStats to store a float internally instead of an integer, and allow you to take small fractions of food bar away.

 

To be honest it at the moment it sounds like a lot of trouble for not much gain?

 

-TGG

 

Finer control. Right now, I can only give between 1 and 20 for eating something. So, if I wanted the player to make a complex meal, there'd be no point - I'll explain in detail:

 

Say you wanted to make a burger, you need these ingredients:

2 bread

2 lettuce

tomato

burger

cheese

bacon

fries

 

So, with just all the raw ingredients, and assuming it ALL gives one point each, that stuff would already restore 9 hunger points (almost half the bar).

Something like a burger meal, I'd only want at the MOST to restore 10 points.

 

Currently, why would the player bother with all the cooking and preparation for the sake of a single point?

 

However, if I could raise the value to say 100, I could make my burger restore around 35-40 points. I could be a bit more varied with the ingredients too; salads being 1, bread 2, meats 3 (Giving a total of roughly 16) - This way, it'd be pretty stupid of the player to eat them raw, and they'll have to use my advanced cooking mechanics to make those ingredients into something interesting.

 

See my point? I don't mind doing a bit of learning, as I imagine switching stuff over would be relatively simple to do compared to a lot of things.

I would much rather go for a higher integer over a float though; if I chose a float, I can imagine all sorts of problems and conflicts with other mods which add food.

 

EDIT:

Would it maybe be easier/more reliable/generally better for me to disable and then recreate the food bar? If so how would I go about doing such a thing?

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.