Author Topic: Use other "fraction".xml on startup a game...  (Read 3538 times)

mictes

  • Guest
Use other "fraction".xml on startup a game...
« on: 26 July 2008, 13:02:16 »
Hi, I again ^^
So I want to ask you where I have to change the Scripts for using different fraction.xml 's on startup a game.
What I want ? Different Start-options the user can choise like:
10 Worker 1Castle 1Tower on startup or
20 swordman 1castle 3 worker or
3 Tower 3worker 1castle etc...
It's difficult to describe ^^ do you know ;)

/Michael
« Last Edit: 1 January 1970, 00:00:00 by mictes »

@kukac@

  • Guest
topic
« Reply #1 on: 26 July 2008, 15:09:32 »
You can find a template for this in \scenarios\storming\storming.xml.
« Last Edit: 1 January 1970, 00:00:00 by @kukac@ »

mictes

  • Guest
(No subject)
« Reply #2 on: 26 July 2008, 15:34:51 »
Hmm. There isn't any "storming" folder.

EDIT:

Ah, the Beta !
Ok - Thank you a lot, I'll have a look on it :)

EDIT:
At the first look I didn't find anything , in which line can i find the "template" ?
« Last Edit: 1 January 1970, 00:00:00 by mictes »

@kukac@

  • Guest
topic
« Reply #3 on: 26 July 2008, 15:59:40 »
The whole XML is a template.
« Last Edit: 1 January 1970, 00:00:00 by @kukac@ »

mictes

  • Guest
(No subject)
« Reply #4 on: 26 July 2008, 16:09:57 »
Ah , 4 eyes see more than 2 ^^

Thank you very much !!!
« Last Edit: 1 January 1970, 00:00:00 by mictes »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
(No subject)
« Reply #5 on: 30 July 2008, 12:24:55 »
Open the folder (in your case tech) you'll see a tech.xml open that. Scroll down to starting units, and add in the unit name and amount. The way you were told will only set it that way for that specific scenario.
« Last Edit: 1 January 1970, 00:00:00 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

mictes

  • Guest
(No subject)
« Reply #6 on: 30 July 2008, 12:44:04 »
Yes that's right but I wanted to do another thing:

When start a game you can choose for example magitech.
The game start's with magitech/tech/tech.xml; magitech/magic/magic.xml
With eg. 3 workers/3 initate
I want you can select instead of the technologie_tree startoptions like:

-Normal (3 Workers 2Swordman 1Cow 1Archer 1Castle 1Defense_Tower)
-Worker (10Workers 1Cow 1Castle)
-Towers (1Worker 1Cow 1Castle 3Defense_Towers)
-Army (1Castle 1Cow 8Swordman 2Archer)

That way:

Normal=magitech/faction/faction.xml
Worker=worker/faction/faction.xml
Tower=Towers/faction...


So long, I'll try with xml include.
« Last Edit: 1 January 1970, 00:00:00 by mictes »

ZaggyDad

  • Guest
(No subject)
« Reply #7 on: 30 July 2008, 13:52:21 »
Well, they could add a feature where it adds an option to start with more of an army, among other things, by having a folder of xmls like the faction file. It could contain xml like this:

Code: [Select]
<starting-units>
<unit type="main_building" amount="1"/>
<unit type="energy_source" amount="1"/>
<unit type="worker" amount="3"/>
<unit type="melee" amount="2"/>
<unit type="ranged" amount="1"/>
<unit type="guard" amount="1"/>
</starting-units>

And then in the faction.xml files:

Magic:

Code: [Select]
<starting-unit-types>
<unit-type name="main-building" unit="mage_tower"/>
<unit-type name="energy_source" unit="energy_source"/>
<unit-type name="worker" unit="initiate"/>
<unit-type name="ranged" unit="battlemage"/>
<unit-type name="melee" unit="daemon"/>
<unit-type name="guard" unit="golem"/>
</starting-unit-types>

<add-starting-units>
<unit name="summoner" amount="1"/>
</add-starting-units>

Tech:

Code: [Select]
<starting-unit-types>
<unit-type name="main-building" unit="castle"/>
<unit-type name="energy_source" unit="cow"/>
<unit-type name="worker" unit="worker"/>
<unit-type name="ranged" unit="archer"/>
<unit-type name="melee" unit="swordman"/>
<unit-type name="guard" unit="defence_tower"/>
</starting-unit-types>

<add-starting-units/>


C&C welcome. ;)

~Zaggy
« Last Edit: 31 July 2008, 17:22:14 by ZaggyDad »

Ayrin Greenflag

  • Horseman
  • ****
  • Posts: 188
    • View Profile
    • http://www.lostinn.com/ayrin
(No subject)
« Reply #8 on: 31 July 2008, 08:55:05 »
oh..that's awesome :) this open to me new possibilities ..thx
« Last Edit: 1 January 1970, 00:00:00 by Ayrin Greenflag »

mictes

  • Guest
(No subject)
« Reply #9 on: 31 July 2008, 10:18:02 »
Yes, thank you very much ZaggyDad !!!
« Last Edit: 1 January 1970, 00:00:00 by mictes »

ZaggyDad

  • Guest
(No subject)
« Reply #10 on: 31 July 2008, 17:19:51 »
Well, it doesn't exist yet. I was just making it up, as a suggestion to the developer(s?), but glad you like it, anyway.  ;)

~Zaggy
« Last Edit: 1 January 1970, 00:00:00 by ZaggyDad »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
(No subject)
« Reply #11 on: 31 July 2008, 21:40:30 »
Don't get too happy, like Zaggy said, it doesn't exist, and Glest updates come only every now and then, due to the low number of programmers.

For now, just make different factions. For example:

Tech-Normal ----- rename the tech.xml to tech-normal.xml

Tech-Worker ----- rename the tech.xml to tech-worker.xml and edit it for 7 workers and no other units.

Tech-Offensive ----- rename the.xml to tech-offensive.xml and edit it for 1 worker and lots of attacking units.


Want me to make those xmls or can you handle them? ?
« Last Edit: 1 January 1970, 00:00:00 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

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

M

  • Guest
(No subject)
« Reply #12 on: 31 July 2008, 23:47:13 »
you will find out as i did the more units the AI starts with the less he makes For exaple lets say you give magic faction 2 or 3 tower of souls and have those attack ground as well as air as i've done well the AI spends all it's time making energy sources and a few damons and nothing else. You have to start with minimum and give the AI a reason to make more like tell it every building you meaning the AI makes it will gain 1 energy. Then if you want it to make a fighting unit in large numbers then do the same for that as well if not the AI will just try to defend with what it starts with but wont make any new when you kill those off even if it has resources and buildings to do so
« Last Edit: 1 January 1970, 00:00:00 by M »

mictes

  • Guest
(No subject)
« Reply #13 on: 1 August 2008, 07:39:30 »
@M:
I consider making a new mod (Action-Mod, more later) and you can be sure there you'll play with gigantic heavy armies !
That Problem I solved by making the worker a little bit cheaper, for e.g ^^

@Omega:
You know that this way will take mass of disc-space cause I have to copy all the units into the folders ^^
I'll try with xi include, it's like the same way. Or did I overlooked anything ?!


Sorry for my english - it's morning ^^
« Last Edit: 1 January 1970, 00:00:00 by mictes »

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
(No subject)
« Reply #14 on: 1 August 2008, 18:03:48 »
ACtually, it doesn't require much disc space. Look at the FPM, you'll notice that all the past models are links. Doing this will allow you to use my strategy without using disc space. It'll take a little bit of time, but if you copy it completely out of the FPM (Four Path Magitech) you will have the links all ready to go.

I tested it, works great, but I don't use magitech much (still testing the new ancient tech tree)
« Last Edit: 1 January 1970, 00:00:00 by omega »
Edit the MegaGlest wiki: http://docs.megaglest.org/

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