Author Topic: Anyone ever tried making a new resource?  (Read 2305 times)

richguy421

  • Guest
Anyone ever tried making a new resource?
« on: 4 April 2009, 18:53:30 »
Just wondering, cause it seems kinda easy.
Would it be possible to make a resource produceable,mineable,consumable, and 1 time spendable(sorry for all the "able" suffixes, you know what i mean)? Like food and gold put together, the castle could make money or you could mine it and certain units could have wages but buildings and other units are only 1 time payment?
I was thinking about this being silver,runes,or just plain cash.
So is this possible? ???

MasacruTheArcher

  • Guest
Re: Anyone ever tried making a new resource?
« Reply #1 on: 4 April 2009, 20:54:53 »
I don't have to much experience in this but about WAGES , i think it's possible to add by editing the certain unit's txt file and add there some codes that will tell it to take an amount of food / gold or stone from time to time , i think it's possible not sure but you can do lots of things in the unit's txt file (:

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Anyone ever tried making a new resource?
« Reply #2 on: 5 April 2009, 08:42:06 »
Yes.

http://glest.110mb.com/xmls.html

Look for the resource XML. Note that a new version of the guide will come out soon with better, clearer, XMLs.

1 time use resources are simply resources that you only get one of, so setting a tech resource (like gold) with a max value of 1 can make just one resource per rock/whatever. The only downside is that the map determines the placement of tech and tileset resources.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Anyone ever tried making a new resource?
« Reply #3 on: 5 April 2009, 14:40:10 »
The AI seems to have trouble dealing with nonstandard resources.

richguy421

  • Guest
Re: Anyone ever tried making a new resource?
« Reply #4 on: 5 April 2009, 21:06:18 »
XD I made my own personal faction that I use when i'm bored and feel like pwning. It combines the magic from the megapack and the tech from the megapack with a few extra units thrown in that I made. I just call it the super faction but if anyone can think of a better name then please tell. Maybe the Alliance?

richguy421

  • Guest
Re: Anyone ever tried making a new resource?
« Reply #5 on: 5 April 2009, 21:10:53 »
And can It have two type values at once like:
<?xml version="1.0" standalone="no"?>

<resource>
   <image path="images/gold.bmp"/>
   <type value="tech">
   <type value="consumable">
      <interval value="30"/>
      <model path="models/gold.g3d"/>
      <default-amount value="2000"/>
      <resource-number value="1"/>
   </type>
</resource>

Or how would I separate the two if that won't work?

deathrun

  • Guest
Re: Anyone ever tried making a new resource?
« Reply #6 on: 8 April 2009, 13:21:12 »
if you want to make something like wages create the resource the label the type "consumable"
this will cause any units that require it to take it away every so often.
if u dont understand look at the food resource

John.d.h

  • Moderator
  • Airship
  • ********
  • Posts: 3,757
  • I have to go now. My planet needs me.
    • View Profile
Re: Anyone ever tried making a new resource?
« Reply #7 on: 8 April 2009, 19:40:27 »
with a few extra units thrown in that I made
I think some of us would be interested in seeing these, if you don't mind.
And can It have two type values at once like:
Try it and see.  Let us know how it goes.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Anyone ever tried making a new resource?
« Reply #8 on: 12 April 2009, 09:24:04 »
I don't think that will work at all. How can a resource be both at a time? Glest wasn't built for that. However, if it does work for you, that is quite interesting... (Why on earth would you want a gold as a consumable??? That just makes it have an interval between gains)

Quote
combines the magic from the megapack and the tech from the megapack
***NOT RECOMMENDED***
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert