| 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 |
|
Deity
|
Mod-Modders Guide to Fall Further
.This post is meant to provide information on precisely what has been added to Fall Further on the DLL side of things, with a bit of mention toward changes made in Python as they seem appropriate. Any questions on how to use the Sourcecode or find specific bits of functional code are quite welcome, as are comments on improvement/changes to the code base.
Base 051 DLL compile Folder (Unpack to have the parent folder path be: Mods/Fall Further 051/CvGameCoreDLL) Imported Work Gameplay Tweaks Tips on editing in Trimmed XML Files How to Make a Module Important Note: The code imported from World of Civilization (WoC) team to improve modular loading means that these following fields are available in ANY XML file. There are many areas in the schema where I did not add them because I anticipated it being unlikely that someone would actually make use of them in such a file (or rather, that it is unlikely anyone would ever modularly modify those files at all)
This import makes it possible to modify any XML through Module, even self-referencing items like PrereqPromotion in PromotionInfos. It also means you don't have to include any fields you don't actually change (so you can have only the Type and the one field you are changing) Custom Work
__________________
Fall from Heaven: - Random Stories and Fragments - Trivia Thread - The Complete FfH Manual - Lore Compendium - The Erebus Project - #erebus - The Mega Story General Information: Mod Details, World Information Resource, Easter Eggs, Quick-Guide, Empyrean/Esus & Guilds Information, The Other Religions, Mana Chart, Religous ThemesSpecific Details: FfH Wikia, FfH Wiki, FF Wiki, World Spells, FoL Guide, Council of Esus Guide, Magic Comparison, Potential Fix for MAF issues Last edited by xienwolf; Jul 19, 2009 at 02:11 PM. |
|
|
|
|
|
#2 |
|
Deity
|
Custom Work (continued)
__________________
Fall from Heaven: - Random Stories and Fragments - Trivia Thread - The Complete FfH Manual - Lore Compendium - The Erebus Project - #erebus - The Mega Story General Information: Mod Details, World Information Resource, Easter Eggs, Quick-Guide, Empyrean/Esus & Guilds Information, The Other Religions, Mana Chart, Religous ThemesSpecific Details: FfH Wikia, FfH Wiki, FF Wiki, World Spells, FoL Guide, Council of Esus Guide, Magic Comparison, Potential Fix for MAF issues Last edited by xienwolf; Jul 14, 2009 at 09:56 AM. |
|
|
|
|
|
#3 |
|
Deity
|
Modifications Borrowed from Other Users:
Minor Tweaks
How to edit our trimmed XML: 1: Use Notepad++ 2: Right click on the TAB for the file you have opened 3: Select "Clone to Another View" 4: Welcome to split-screen view! You now see 2 copies of the same file, who cares?! 4.5: Make sure that you are split vertically (side-by-side) instead of Horizontally (I get the top!) 5: In one copy, focus on what you want to change/add 6: In the other copy, scroll down to "Test Promo" (actually, just search. As long as you include a space before/after any word, it searches very nicely to the commented name instead of the 5,000 other lines of code that use that word somehow...) 7: Now that you have the test promotion (all fields) right next to your change/addition, you can see the precise order required for all fields, and only use the ones which matter in some way! 8 (occasional): If your field requires sub-elements, and nothing else actually USES those subelements, open up the Schema file and pray that you understand how to read them (just encase the <> value you need subelements for in "" marks and you should get a result which lists what comes inside of it. You may have to also search for each of those for the REALLY nested entries...) Yes, the trimmed XML can make adding things to the file a PITA, but it makes figuring out what the file actually DOES a lot quicker/easier in the end since you don't have to scroll through 500 cases of >0< or >NONE< and pray you don't overlook the >1< which is causing you issues...
__________________
Fall from Heaven: - Random Stories and Fragments - Trivia Thread - The Complete FfH Manual - Lore Compendium - The Erebus Project - #erebus - The Mega Story General Information: Mod Details, World Information Resource, Easter Eggs, Quick-Guide, Empyrean/Esus & Guilds Information, The Other Religions, Mana Chart, Religous ThemesSpecific Details: FfH Wikia, FfH Wiki, FF Wiki, World Spells, FoL Guide, Council of Esus Guide, Magic Comparison, Potential Fix for MAF issues Last edited by xienwolf; Jul 19, 2009 at 02:10 PM. |
|
|
|
|
|
#4 |
|
Deity
|
In Fall Further you now have far more control over what you can do with a module. We have included a module with the release of 0.51 which demonstrates nearly all of the new capabilities of modular modding in a fairly compact little frame. That module is Bannor Chain of Command and is included as an attachment to this post because it will either stop being distributed with future releases of the mod, or simply be incorporated as a non-modular aspect of the mod. It is released as a module now because it works excellently as a demonstration of Modular capabilities and because the team still hasn't decided if we think it is the proper answer for making the Bannor unique and flavorful. 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 Modular Python: I put this one first because it isn't possible. It might be some day, but it isn't yet and I personally don't plan to make it possible any time too soon. There are a few ways you can make it NEARLY modular though. One approach is to make the main python files call out to your new python files with a single line in each function you want to add to. Then you have minimal code to merge on each update no matter how complex you make your own additions. I provide no examples of this as I don't know if it causes a notable performance hit and I didn't need anything THAT elaborate. Another method, the one which Bannor Chain of Command demonstrates, is to slip your python into the main code with a conditional statement that verifies the module has indeed been loaded. This makes it so that you can include the python changes with your module and stll convince people that it can be removed from their installation of the game quite easily. Also if all module writers can collaborate and include one another's python inserts there is less of a fuss to make modules compatible with one another. And if the module is liked enough by the team and the python really does seemlessly remove itself when the module isn't loadaed, the python portion just might be included in future patches. In our case, we simply check the info type of one of the new promotions introduced in the module. If that promotion exists, the module loaded (or someone happened to choose the same name for their own promotion, oops), if it doesn't, then the module most certainly isn't included and the code is simply skipped. You can find the code in the CvSpellInterface.py function for selecting a commander unit to attach to. 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 Deleting stuff from the game: Bet you never thought a module could do this one Well, they can't really. But they can make it impossible to use or find stuff, which is the next best thing. To accomplish this you need only set the prerequisites for the item to something impossible, and then make it bGraphicalOnly. The main trick is figuring out how to make it impossible to get, but most things which matter significantly (and are thus prone to deletion) are pretty easily made forbidden.In our case, we delete a spell which works kind of like Wane for the Bannor to allow them to promote high level units into Commanders. This means that if the module isn't loaded then the Bannor still have SOMETHING which connects them more heavily to Commanders than any other Civ and allows access to them without direct warfare (ie - through Barbarian fights), even if it is just a small patch-measure. But of course such a spell would be wildly innapropriate if combined with Bannor Chain of Command, so we effectively delete it by making use of one of the new Modular Commands. <bForceOverwrite> means that anything which was already loaded for this <Type> is removed and ONLY what is included in this modular file (and anything loaded after it) will be relevent. A spell which doesn't do anything is never castable, so we just leave it blank except for bGraphicalOnly which hides it from the Pedia. 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 Small Tweaks: The greatest functionality of this new system is that if you just want something to be SLIGHTLY different, you can make ONLY the small change which you want, so long as that change isn't to REMOVE something, but to ADD it. Unfortunately you cannot make both of them be easy at the same time, and adding tends to be done more than subtracting, so that's what we make easy. In our case, we demonstrate this by adding an extra free promotion (One of our new ones) to a unit (The Bannor UU replacement for the Great Commander). We simply state the unit and the free promotion, nothing else. He retains his other stats which were already loaded in the main XML, including the Free Promotions already assigned to him. Should the main mod change his strength, Unitcombat, Cost, Prereqs or anything else, our module needs no work to update at all. 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 Self-Referencing Fields: This is something you don't completely understand without looking at the DLL or hearing about it before, but the main previous issue with Modules was the ability for text strings which refer to the file itself (or to files which are loaded later) to properly link up. This was an INFURIATING limitation, because Technologies and Promotions both require self-reference to be interesting in any way at all, and some of the more interesting units refer to other units in some way (like Air Elementals which spawn Lightning Elementals). And quite a few files happen to reference other files which load after themselves (due to referencing each other in some roundabout way, like Units and Civilizations). This is (obviously) demonstrated by our promotions being added with each other as prereqs to form a promotion chain. Very simple thing to do, but previously impossible. 0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0 Structure: We do not go out of our way to demonstrate this aspect of modular loading because the earnest hope is that it will never be required. But our new modular system makes it so that a module can be made to modify another module. In this case you need to ensure that the other module was loaded first so that your changes apply over the top of it. Doing that used to be possible by making sure that your module came last in alphabetical order, but sometimes that wasn't such an exact science as one would imagine. Now you know without a doubt which module will load when, by using the MLF files to control the load order. If you do not care about how a folder's contents load, you include a blank MLF (as we have done inside the Modules/NormalModules folder, as well as a few others). This last step is vital, as a folder which contains no MLF file at all will not load any deeper into the folder structure (but it will load XML within that folder itself). This can be exploited to remove a module from loading without removing the full contents, just delete the MLF in the folder above it. But if there are multiple modules in the same folder and you want to stop loading only one of them, then you can edit the MLF to state that you wish not to load that Module (just by changing a 1 to a 0). Mostly it will be the Module Makers who worry about MLF files, and the Module Adicts who have so many of them and for some reason decide to see what life is like without one or two
__________________
Fall from Heaven: - Random Stories and Fragments - Trivia Thread - The Complete FfH Manual - Lore Compendium - The Erebus Project - #erebus - The Mega Story General Information: Mod Details, World Information Resource, Easter Eggs, Quick-Guide, Empyrean/Esus & Guilds Information, The Other Religions, Mana Chart, Religous ThemesSpecific Details: FfH Wikia, FfH Wiki, FF Wiki, World Spells, FoL Guide, Council of Esus Guide, Magic Comparison, Potential Fix for MAF issues Last edited by xienwolf; Jul 19, 2009 at 02:07 PM. |
|
|
|
|
|
#5 |
|
Great Sage
Join Date: Feb 2007
Location: Kael's head
Posts: 14,073
|
Reserved for Past Use.
|
|
|
|
|
|
#6 |
|
Follower of Tytalus
Join Date: Dec 2001
Posts: 3,327
|
This thread a good place for modding questions?
I'm thinking about giving the Scions a 1-use-only "Appease the Gods" effect. ("Emperor's Boon", or "Emperor's Intercession", something like that.) Is setting up a Project that requires the Scions-only tech and has 1 "maxglobalinstance" the only way to do it via XML? (Or, I guess, 5 instances to fully cancel 1 use of Curse the Lands?) |
|
|
|
|
|
#7 | |
|
Modmod Monkey
Join Date: Nov 2005
Posts: 3,206
|
Quote:
|
|
|
|
|
|
|
#8 | |
|
Follower of Tytalus
Join Date: Dec 2001
Posts: 3,327
|
Quote:
Luxury resources being a big part of the Scion's spawning modifier I was also worried CtL would be extra-effective against them. I've decided it wouldn't be, or not much: They're nearly immune to problems from the Health resources being cut off. I think the Elohim are also be a good candidate for a cheap Appease effect - or maybe even an automatic one: The first Curse cast against them doesn't work.
__________________
I know how God can make a rock so big He can't lift it. FFH2 modular mod thread. Fall Further modules thread. Last edited by Tarquelne; Sep 30, 2008 at 12:14 PM. |
|
|
|
|
|
|
#9 |
|
Warlord
Join Date: Oct 2007
Posts: 292
|
Semi bug report, but since it's only really important for modmodders I'll place it here.
I've been having some issues with Modular Loading and FF. I turned it on in the .ini and either Civ crashed when making the map, or it 'crashed' after I had closed it and had already been returned to my desktop. I tested the same setup in vanilla FfH and it worked there. |
|
|
|
|
|
#10 | |
|
Modmod Monkey
Join Date: Nov 2005
Posts: 3,206
|
Quote:
|
|
|
|
|
|
|
#11 |
|
Warlord
Join Date: Oct 2007
Posts: 292
|
It crashes with Modular Loading turned on, even if there's no modules present.
Furthermore, it crashes when it's creating a map. If I load an existing save, or a scenario map, it crashes afterwards. (As far as I can tell) |
|
|
|
|
|
#12 |
|
Deity
|
Been forgetting to update this, so here are some items which I posted a while ago and a bunch of new ones I just wrote up tonight on a whim.
PromotionInfos: iExtraDropRange - Grants the unit the ability to teleport farther (or at all if they weren't able to before) iAirCombatLimitBoost - Allows the unit to do more total damage with ranged attacks (or at all if they weren't able to before) iAirCombat - enhances ranged attack strength (or grants ranged attack strength) PrereqbAllowNULLUnitCombat - Allows the promotion to be available for units with no UnitCombat (needed for certain spells, and could be nice to let the golems & Loki have access to at least 1 promotion...) Invisible - Allows multiple Invisible types to be assigned per promotion and stacked onto the unit. Proper format would be the same as seeinvisible in UnitInfos (<Invisble>INVISIBLE_LAND,INVISIBLE_ANIMAL</Invisible>). Can't remember if I added this to Unitinfos as well.... SeeInvisible - Same as above, exact copy of how things were already done in UnitInfos (not that many people realized you could list multiple Invis types to begin with...) PromotionDegradesTo - When you lose the promotion, you will gain all listed promotions (unless immune to them of course) PromotionExcludes - Replacement for PromotionImmune1-3 with a list of variable length. Can now be immune to everything you care to be. PromotionOverwrites - Removes the listed promotions from the unit when this promotion is gained (does not block you from gaining them later though, that is PromotionExcludes job). I had added this feature to PromotionImmune1-3 a while back, but realized it is useful to seperate them (for Naval Crews most notably) PromotionReplacedBy - When you gain one of the listed promotions, you will lose this promotion. Sort of the previous listed promotion, but done in reverse. Now that I think of it that way I am not entirely certain why it is needed... I am sure I had a decent reason at the time.... PrereqWeaponTier - Added it now after realizing that I wanted to add it long ago and apparently did not. Probably I just didn't feel like re-writing the WeaponPromotions to use PromotionImmune1-3. Anyway, with this field and the above listed fields it is now trivial to add as many more tiers of weapons as you would like. bFreeUnit - Adds 1 Free Unit to the player's Base Free Units value, effectively making this unit cost no maintenance. Also set all Summons to start with this feature active. ProjectInfos iCooldown - Time delay until you can complete a ritual again. This just works to restore your Team/Global limits, so if you are allowed to build 5 of a ritual and it has a cooldown, you can build all 5 at once, or immediately after each other. Timer is linked to each instance of constructing the ritual as well, so it doesn't start over at 0 when you complete a new copy of a ritual. This was one of the major "new balance" ideas for Curse the Lands. Now it can be limited to a single use in a LONG time period for each team. bResetProjects - My first attempt at a counter-strike method for Curse the Lands. Pending balance decisions for precisely how to make use of it of course. And quite likely it will need some massive rebalancing shortly since the Illians appear to use quite a few rituals, but I like that there will be a counter for them as well (and a tactical decision between using this to stop Mulcarn, or saving it to save your bacon from Curse the Lands). Anyway.... it will set the current production to 0 for all Rituals for both your team and everyone that you are at war with. Gameoption New gameoption to cause all unique features to spawn on the map.
__________________
Fall from Heaven: - Random Stories and Fragments - Trivia Thread - The Complete FfH Manual - Lore Compendium - The Erebus Project - #erebus - The Mega Story General Information: Mod Details, World Information Resource, Easter Eggs, Quick-Guide, Empyrean/Esus & Guilds Information, The Other Religions, Mana Chart, Religous ThemesSpecific Details: FfH Wikia, FfH Wiki, FF Wiki, World Spells, FoL Guide, Council of Esus Guide, Magic Comparison, Potential Fix for MAF issues Last edited by xienwolf; Oct 03, 2008 at 11:46 PM. |
|
|
|
|
|
#13 |
|
Great Sage
Join Date: Feb 2007
Location: Kael's head
Posts: 14,073
|
Nice. Now, is there any chance we can get you to focus on improvements, including implementing (the equivalent of) Jeckel's JCultureControl and JImprovementLimit modcomps. Not necessarily the same code, but functionality like having distance requirements between improvements, letting existing improvements on a tile be a prereq for building better ones (might be a good idea to let such improvements be build even over permanent improvements, as the ability to convert one Unique feature to another could be quite nice), letting improvements have specific owners, letting them have cultural borders (this might be good as a game option), letting different civs have unique improvements, maybe letting promotions give build orders, setting maintenance costs for improvements, settling limits on how many of specific improvements may exist, etc?
|
|
|
|
|
|
#14 |
|
Deity
|
Not likely to get me to do much of anything but bug fix and merge for a little while now. Got some other work I need to focus on, so any code that happens is just code that is stuck in my head or relaxing to complete.
And I'd be more likely to create my "Aspects" idea than touch any existing tile data anyway at this point.
__________________
Fall from Heaven: - Random Stories and Fragments - Trivia Thread - The Complete FfH Manual - Lore Compendium - The Erebus Project - #erebus - The Mega Story General Information: Mod Details, World Information Resource, Easter Eggs, Quick-Guide, Empyrean/Esus & Guilds Information, The Other Religions, Mana Chart, Religous ThemesSpecific Details: FfH Wikia, FfH Wiki, FF Wiki, World Spells, FoL Guide, Council of Esus Guide, Magic Comparison, Potential Fix for MAF issues |
|
|
|
|
|
#15 |
|
Follower of Tytalus
Join Date: Dec 2001
Posts: 3,327
|
Good stuff! I'll see if I can remember all the features I wanted to add but couldn't previously.
Or maybe I'll just think up excuses to use the new fields. ![]() Anyway, |
|
|
|
|
|
#16 |
|
Great Sage
Join Date: Feb 2007
Location: Kael's head
Posts: 14,073
|
Care to explain more about what these "Aspects" will be?
|
|
|
|
|
|
#17 |
|
Deity
|
Quite simple. Aspects are to Plots what Promotions are to Units and Building are to Cities (and I guess Traits to Players)
__________________
Fall from Heaven: - Random Stories and Fragments - Trivia Thread - The Complete FfH Manual - Lore Compendium - The Erebus Project - #erebus - The Mega Story General Information: Mod Details, World Information Resource, Easter Eggs, Quick-Guide, Empyrean/Esus & Guilds Information, The Other Religions, Mana Chart, Religous ThemesSpecific Details: FfH Wikia, FfH Wiki, FF Wiki, World Spells, FoL Guide, Council of Esus Guide, Magic Comparison, Potential Fix for MAF issues |
|
|
|
|
|
#18 |
|
Great Sage
Join Date: Feb 2007
Location: Kael's head
Posts: 14,073
|
Ok, but what will they do? Change yields, defenses, movement rates? Will they be able to have python calls like improvements and features now can? to spawn units? to deal damage? to effect health and happiness? to be impassible to certain units? to be used as prereqs for units promotions and cities buildings? to effect culture? etc?
|
|
|
|
|
|
#19 |
|
Deity
|
They'll do whatever you want to program them to do. So the short answer would be "Yes"
If you mean to ask what I will initially program them for, primarily defense adjustments, heal rates, yield modifications, attributes to be used as pre-reqs for other things (improvements, features, whatever), Level requirements to enter the tile, targets for modification by spells, and the single most important reason will be to establish AI Weighting values for each individual tile in regards to risk/reward factors. Then you can have units set on automated explore who will not walk right past a lair, but instead move to stand on it, then cancel the automation so you can explore it manually. Elohim explorers who understand they want to visit the Unique Features, Illian Explorers who understand that they do NOT walk right past Letum Frigus, an inborn understanding that there is equipment sitting on a tile waiting to be picked up.... list could go on for a while about the number of things that the Aspects will help to track so that the AI can make informed decisions. And once the framework is there it will be a matter of time till ideas flood in for how to use it all effectively. Hell, might even come up with a Civilization of sapient plants whose entire theme is that their Plots gain XP and cast spells and on occasion they happen to also make use of a "standard unit" to interact with the other civilizations.
__________________
Fall from Heaven: - Random Stories and Fragments - Trivia Thread - The Complete FfH Manual - Lore Compendium - The Erebus Project - #erebus - The Mega Story General Information: Mod Details, World Information Resource, Easter Eggs, Quick-Guide, Empyrean/Esus & Guilds Information, The Other Religions, Mana Chart, Religous ThemesSpecific Details: FfH Wikia, FfH Wiki, FF Wiki, World Spells, FoL Guide, Council of Esus Guide, Magic Comparison, Potential Fix for MAF issues |
|
|
|
|
|
#20 |
|
The Hamster King
Join Date: May 2008
Location: Crestview FL
Posts: 14,448
|
First off, I really hope you stick with this Aspects idea... At the very least, it would greatly improve exploration, as you wouldn't have to constantly check on your scouts to see if they passed anything by, and would help make the Elohim AI a bit more formidable... Would actually be able to gain the extra traits and other bonuses.
Second, I would totally play the plant race.
|
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Modders Guide to FfH2 | Kael | Civ4 - Fall from Heaven | 1900 | Jun 17, 2013 07:58 PM |
| Modders Guide to Beyond the Sword | Kael | Civ4 - Modding Tutorials & Reference | 281 | Jun 06, 2013 10:18 PM |
| Modders Unite! for Stargate MOD | Joebasalt13 | Civ4 - Creation & Customization | 11 | Jul 30, 2009 04:55 AM |
| Modders Guide to Beyond the Sword | Thunderfall | News Updates | 5 | Jul 10, 2007 01:36 PM |
| Religious Mod [modders needed...] | Hobelhouse | Civ4 - Creation & Customization | 12 | Nov 20, 2005 12:04 PM |