| General | Hosted Sites | Civ5 | CivRev | Civ4Col | Civ4 | Civ3 | Civ2 | Civ1 | Misc | Marketplace |
![]() |
|
|
Welcome to Civilization Fanatics' Center. You are currently viewing our site as a guest which gives you limited access to our site features. By joining our free community, you will be able to participate in the discussions, search the forum, send private messages, vote in polls, upload your own screenshots to the gallery, and access many other special features. Registration is fast, simple and absolutely free, so sign up today! If you have any problems with the registration process or your account login, please contact support. |
|
|||||||
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Prince
Join Date: Nov 2001
Location: UK
Posts: 398
|
Change resource - Help
I want to change the resource IVORY to ELEPHANT so that all nations can use them as "War-Phants"
Is it an <Update> issue? Any help or guidance will be great. Regards Riker13
|
|
|
|
|
|
#2 |
|
Mad Scientist
Join Date: Sep 2005
Location: Los Angeles, CA
Posts: 3,062
|
You need more detail about what you're trying to do, but the short answer is no, you can't just do it in XML. Here are a few issues you'll have to keep in mind:
1> If you want to have a resource be used as a strategic, then you'll have to change its Resource Class from Luxury to either Rush or Modern as an XML change. 2> You'll also need to adjust the quantities, and that means Lua editing, because the XML fields for this aren't used. (Specifically, AssignStartingPlots will need to be HEAVILY modified in at least six places that I can think of.) Luxuries and Strategics are handled almost entirely separately, so changing something from one category to the other would require a large amount of editing to the spawn tables. 3> The UI (specifically TopPanel.lua) will treat any resource that has a <Happiness> value as a luxury and not a strategic, regardless of what Resource Class you set. It's easy enough to fix this (I did so for my own mod), but this means that if you want elephants to still act as a luxury then you'll have issues. And removing its happiness has all kinds of other balance issues. Plus the usual assortment of Civilopedia entries you'd have to tweak. |
|
|
|
|
|
#3 |
|
Prince
Join Date: Nov 2001
Location: UK
Posts: 398
|
Bugger ;(
But thanks for the quick reply, ok plan 2..................... |
|
|
|
|
|
#4 | |
|
Chieftain
Join Date: Jan 2009
Location: Georgia, U.S.A.
Posts: 82
|
Quote:
|
|
|
|
|
|
|
#5 | |
|
Mad Scientist
Join Date: Sep 2005
Location: Los Angeles, CA
Posts: 3,062
|
Quote:
The first problem is that when the script calls GetMajorStrategicwhatever, the calling statement has a specific number of arguments. It's not being handled as an allocatable data structure or anything like that, so when the calling routine has 7 arguments and the called routine returns 10, or vice versa, then things break. It's just not dynamic; if you add a new resource, then you need to rewrite all of those, and that's what makes it incompatible with, say, the Lakes map script (since it has its own version of that subroutine). If the devs were smart they'd have written the map script resources as a modifier, so that you could default any new resources to x1, but they instead took the cheap way out and overwrote the existing routine. (The fact that map scripts override mods is also backwards, IMO.) This also means that if you restructure AssignStartingPlots to read from files, then the Lakes, Great Plains, and Highlands map scripts will stop working entirely unless you make new versions of them as well. The second problem is that the rarities are all handled through a bunch of weighting tables, and while you COULD transfer all of those to XML, it'd be a HUGE amount of work. So if a Small deposit on a grassland hill has a 25% chance of being Iron, a 45% chance of Uranium, and a 30% chance of Aluminum (just making those numbers up), then think about how much XML you'd have to write to just set that ONE rarity table. Now double that for the Major deposits, and add in the other dozen or so terrain types. Besides just being a tremendous amount of work, you'd also end up with something that's completely incompatible with any future updates. Now, if Firaxis was smart they'd do this themselves, so that they could fix the map scripts at the same time. Of course, doing that would break plenty of existing mods (like mine) and nearly any custom map script, so I hope they don't do that any time soon. |
|
|
|
|
|
|
#6 | |
|
King
Join Date: Feb 2010
Location: Lancaster
Posts: 678
|
Quote:
__________________
SpeedRepacing - 2k Forum Thread - Official Wiki Page | Technology Enhanced Improvements - 2k Forum Thread - Official Wiki Page | Enhanced Resources - 2k Forum Thread - Official Wiki Page | Saner AI City Locations - 2k Forum Thread - Official Wiki Page |
|
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|