Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Civilization IV > Civ4-General > Calling all mod'rs
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
22.Sep: BLUE IS OCEAN, GREEN IS GRASS
22.Sep: SMAC-LIKE UN COUNCIL CONFIRMED
21.Sep: GERMAN `ANONYMOUS` LAUNCHES

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Platypus Rex is offline Platypus Rex

King
Give Blood..Give Life- just 20 min.. Woodland,CA
Sep 2002
time: 21:18
  Old Post 01-05-2005 11:00 Visit Platypus Rex<br><a href=/members><img src=/forums/images/inmate-icon.gif border=0></a><BR>'s homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Calling all mod'rs Support Apolyton, buy Alpha Centauri

Begginers guide on how to mod in python


http://sthurlow.com/python/

Vince278 is offline Vince278
King

Dec 2002
time: 05:18
  Old Post 01-05-2005 11:32
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Thanks. A good start in Python. Anyone want to provide info on XML?

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:18
  Old Post 01-05-2005 15:11 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

There are many places to learn about Python, one that I like myself is the tutorial on the official website: http://www.python.org/moin/BeginnersGuide (it should be noted that it covers most aspects of Python, it's quite extensive). This one is particularly good for people with zero programming experience.

I would indeed recommend that everyone who wants to get into Python for Civilization 4 start looking into tutorials like these before the game's release. You now have all the time in the world anyway, so you can see what it's like and if it would be something for you (not everyone will be into it). Then, when you get your hands on Civilization 4, you only need to learn the Civ4-specific parts of Python before you can start writing scripts.

As far as XML goes, if you want to see an example of XML, go to the menu View of your browser and select Source or Page Source or something like that (depending on your browser). You'll see the HTML source of this page, that's a fine example of what XML looks like (it's not actually XML, but very, very similar; XML is based on HTML). XML allows programmers to make up their own 'language', so there's no way to predict what XML for Civilization 4 will look like, that's entirely up to the programmers at Firaxis. However, all XML languages look alike. The portion of XML that stores the unit data might look something like this:

<Unit>
    <Type>Spearman</Type>
    <Class>Melee</Class>
    <CostToBuild>240</CostToBuild>
    <MaintenanceCostShield>2</MaintenanceCostShield>
    <MaintenanceCostFood>0</MaintenanceCostFood>
    <MovementPoints>1</MovementPoints>
    <StrengthValue>4</StrengthValue>
    <BonusAgainstHorse>100</BonusAgainstHorse>
    <BonusAgainstTank>0</BonusAgainstTank>
</Unit>

Of course, the details such as exact names and stats will be different and presumably there will be many, many more stats, but the basic idea is always the same. All other in-game data will be stored using a similar pattern.

As you can see, providing Firaxis uses meaningful naming conventions XML should be pretty easy and intuitive to use, and at least for simple modding the learning curve is almost much flat (you only need to figure out where everything is located)...

Vince278 is offline Vince278
King

Dec 2002
time: 05:18
  Old Post 01-05-2005 15:17
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Increase Your PM Length

quote:
Originally posted by Locutus
so there's no way to predict what XML for Civilization 4 will look like,


However, all XML languages look alike.


Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:18
  Old Post 01-05-2005 15:31 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

By that I mean that the pattern in XML is always the same:

<SomeDataType>
   <SomeProperty>SomeValue</SomeProperty>
   <SomeProperty>SomeValue</SomeProperty>
   <SomeProperty>SomeValue</SomeProperty>
   <SomeProperty>SomeValue</SomeProperty>
</SomeDataType>

However, all the details of an XML language, such as the exact names of the datatypes, properties, etc and the exact values that are allowed, and of course what impact they will have when you use the language, those differ per language. E.g. in HTML <b> displays text in bold, in Civ4 it will probably mean nothing and generate an error. In Civ4 <StrengthValue> might indicate the unit strength, in HTML it means nothing. Thus, exactly what XML for Civ4 will be like is impossible to predict, but it will still follow the same pattern that all XML languages use.

To compare it to natural languages: knowing that Civ4 will be XML is like knowing a language is Germanic. But to be able to speak that language, you will still need to know whether it is English or Dutch or German or Swedish or Frisian, etc. Without knowing that you still won't be able to make yourself understandable in that language. All those languages may have a lot in common, but they also have a lot of differences.

Donegeal is offline Donegeal
King
Apolyton's Resident Law Enforcement Officer. Founder of the Glory of War, Champions of Apolyton!
Jul 2002
time: 05:18
  Old Post 01-05-2005 18:36
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Lose 30 kilos (of popups)

I was just thinking of posting a thread asking for this info. Thanks!

-Nudge-

Hey, Mark, I think this would be a good thread to top in the CivIV creation forum (when it will inevitably come).

self biased is offline self biased
King
Yggdrasil.
Nov 1999
time: 00:18
  Old Post 03-05-2005 18:32 Visit self biased's homepage!
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Support Apolyton buy from Amazon

anyone interested in starting groundwork for a fantasy mod?

Vince278 is offline Vince278
King

Dec 2002
time: 05:18
  Old Post 03-05-2005 19:29
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Inflate your Upload Space

quote:
Originally posted by Donegeal
I was just thinking of posting a thread asking for this info. Thanks!

-Nudge-

Hey, Mark, I think this would be a good thread to top in the CivIV creation forum (when it will inevitably come).


Great idea. This will be a huge subject generating lots of questions (and threads) when the time comes.

Senethro is offline Senethro
Prince

Jul 2004
time: 05:18
  Old Post 03-05-2005 21:18
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Put an end to popups!

I'm not so interested in a fantasy mod but in a Alpha Centauri recreation mod. I've whispered here and there that it would be a good idea. I don't think anyone would object to having working Social Engineering or Unit Workshop code available for incorporation into their own mods and it would be a mod for gathering experience with Civ4.

Any thoughts?

Vince278 is offline Vince278
King

Dec 2002
time: 05:18
  Old Post 04-05-2005 10:23
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Put an end to popups!

Could do a Centauri type mod that allows "colonization" of the moon and the other planets and moons of the solar system. I always thought we should expand out more before going to A.C.

Nikolai is offline Nikolai
Emperor
Bergen, Norway
Oct 2000
time: 06:18
  Old Post 04-05-2005 15:47
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton, buy GURPS/ Alpha Centauri

Senethro: Nice idea, but first I think I want to play Civ4.

LDiCesare is offline LDiCesare
King
La Ferté sous Jouarre France
Jan 2001
time: 05:18
  Old Post 04-05-2005 19:16
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Remove this text

Locutus, your xml examples are only one possibility of doing xml. There's also this one:
<Unit name="Spearman" strength="2" someProperty="someValue"/>
I don't think Soren showed an example of what the actual format would look like? Although I definitely perfer the more verbose one using <x>value</x> instead of x="value" since you can't do everything with the latter format but can with the former.
[edited the lt; > stuff]

Last edited by LDiCesare on 04-05-2005 at 23:26

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:18
  Old Post 04-05-2005 19:34 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Browse Apolyton AD-FREE

My my example was not supposed to be exhaustive, there are other things I didn't mention either (e.g. I didn't really mention (multi-layer) nesting). IMO attributes work nicely in HTML but should be avoided whenever possible in XML (there are some distinct disadvantages to them, as you said). And this is also usually what you usually see in practice. But yes, it is indeed a good form of XML that I problably should have mentioned...

Edit: for those who don't know how to read the example LDiCesare mentioned, I'll repost it in a readable form:

<Unit name="Spearman" strength="2" someProperty="someValue"/>

Lemmy is offline Lemmy
King
Bubblewrap
Dec 2000
time: 06:18
  Old Post 04-05-2005 20:21 Visit Lemmy's homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

hmm...with proper stylesheets this could make it easy to create online civpedias for mods

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:18
  Old Post 04-05-2005 20:36 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

Yes, that is one of the great things about XML, you can really easily re-use existing XML documents it to develop your own tools. Fan-made editors, reference charts, websites, etc should all be pretty easy to make.

LDiCesare is offline LDiCesare
King
La Ferté sous Jouarre France
Jan 2001
time: 05:18
  Old Post 04-05-2005 23:29
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Support Apolyton, buy Call to Power 2

You can even make forms to help fill out xml automatically. Richard Burns had done that for the tech model in Clash (where all resources are xml). It was nice, even though we didn't use it a lot, and I'm sure that people will create some helper tools fast if firaxis doesn't provide any (after all, we've got modswapper for CtP2 and Galciv had an player-created editor for text resources - this should be even easier).

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:18.
Apolyton Time is 00:18.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0513 seconds (91.90% PHP - 8.10% MySQL) with 30 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net