Jump to content
Sign in to follow this  
MuteLovestone

adding new resources (ie water, and Cloth)

Recommended Posts

Hello, the name is mute. I am currently planning a few mods and one thing came to mind

I want to add a few new resources

  • Water
  • Special Minerals
  • Cloth
  • Different Metals
  • Few types of stones

Reasons

Water

  • To add a little bit of dificulty

Minerals/stones

  • having just one type of metal seams counter productive
  • looks odd that you mine what looks like iron yet units look to wear gold

Cloth

  • Having units just get clothing makes no sence unless it was made out of meat..............Yuck..............
  • Would add more chalange to the game

Special Minerals

  • This is more of for my own mods i would like to add a few resources
  • But that is for everyone else to see when its done

Former CoM, but still looking to be helped by them

Finaly the water as been added, even if only a beta stage

Recs.7z

Edited by MuteLovestone

Share this post


Link to post
Share on other sites

First note that we have a resources subsystem. F.e. there's food.grain, food.fruit and food.meat. Those subtypes result in other animations (for carrying and gathering), but get counted towards the same total, to not make the game too complicated.

To define new resources or new resource subtypes, there are some components involved. There's the ResourceHolder which you need to let entities contain an amount of that resource (F.e. a rock carries 5000 stone thanks to ResourceHolder). Then there's ResourceGatherer to let units gather those resources. You also need to drop then somewhere, that's defined in ResourceDropsite.

After you gathered some resources, you also need to buy stuff with it (note that for buying, there are no subtypes used). Buying is defined in the Cost, ProductionQueue and Builder components.

After changing the simulation, you'll also have to change the Gui (displaying the right icons) and the art side (adding the animations).

Share this post


Link to post
Share on other sites

awsome thank you very much, i can do all but the animation part, although can i start out with having them do no animation to test it out or do i need an animator to help me with that?

Share this post


Link to post
Share on other sites

If an animation exists (f.e. the stone-mine animation fits for the stone subtype animations too), then you just have to define it in the right actor files (which might be a bit of a hassle).

If you don't define an animation, a unit always defaults to the "idle" animation.

Share this post


Link to post
Share on other sites

ERROR: CXeromyces: Parse error: in_memory_buffer:0: Element element name 'water,' is not an NCName

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

what the heck does that mean? did i spell something wrong or what im so lost

Hitting The Hay time :) night all

Share this post


Link to post
Share on other sites

would there be a new kind of building for weaving cloth or something?

Hello, the name is mute. I am currently planning a few mods and one thing came to mind

I want to add a few new resources

  • Water
  • Special Minerals
  • Cloth
  • Different Metals
  • Few types of stones

Reasons

Water

  • To add a little bit of dificulty

Minerals/stones

  • having just one type of metal seams counter productive
  • looks odd that you mine what looks like iron yet units look to wear gold

Cloth

  • Having units just get clothing makes no sence unless it was made out of meat..............Yuck..............
  • Would add more chalange to the game

Special Minerals

  • This is more of for my own mods i would like to add a few resources
  • But that is for everyone else to see when its done

If you would like to make small team for this then that would be awesome if not just point me in the right direction

Share this post


Link to post
Share on other sites

well for water im planning on useing the farm to "Recycle" water, at first and i was hopeing to get some new people to work on this with me since i suck at moddels and textures

Share this post


Link to post
Share on other sites

you'll have to edit the GUI files. Certainly for those resources being displayed at the top of the screen. I'm not sure for the selection gui or the cost tooltips.

Share this post


Link to post
Share on other sites

Cool you have water in. Have you the files separated, I mean 'isolated' from the rest, then we can put it as a separate mod. This could then be added/removed and defined as a dependency in your mod-pack (Realms of Men for example).

So you solved the CXeromyces Error? Looks like a syntax or scheme error. If you wish to share the files then I could isolate them for you.

To answer to my isolation-question:

Did you create / change the files in the data/mods/public/ folder? Then it's not isolated yet.

Or did you create your own mod folder like: data/mods/<your-mod>/ ? e.g. data/mods/water_as_resource/

Good work. btw.

Share this post


Link to post
Share on other sites

Don't give up. I see our units already carrying buckets to the nearby river and collecting water . :D though currently we might have to use sandpits. np :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Sign in to follow this  

×
×
  • Create New...