![]() |
| General | Hosted Sites | CivRev | Colonization | Civilization IV | Civilization III | Civilization II | Civilization | 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 |
|
Modder For Life
Join Date: Apr 2002
Location: Exit 16, New Jersey
Posts: 6,797
|
The 3.19 patch and what it means for SDK modders
Friends, the Firaxis gods have smiled upon us and graced us with another patch! This one, like others, has given us new code exposed to the DLL.
The tyranny of the Gamefonts file is finally over! Yes, you'll still have to use it, but we now have a lot more control over it from within the SDK. My overall impressions is that there's a lot of new functionality for modifying game sounds, some new functionality for messing with the interface, but nothing particularly earth-shattering beyond that. That said, given how much we've already got, I'm not sure we NEEDED anything earth-shattering. Here's a more comprehensive list of the stuff that's been moved to the DLL (if anybody in the know thinks I missed something big or got something wrong, feel free to post it): CvCity getBuildingArtInfo getBuildingVisibilityPriority These two give you greater control over how cities look. Haven't really thought of any great applications for them... will probably be mod-specific. getMusicScriptId getSoundscapeScriptId These affect city sounds. I'd like to tweak these myself because I want there to be a distinction between the sounds of coastal and inland cities. When you open a coastal city screen, you might hear seagulls, a boat horn, etc. getBuildQueue Not sure why you'd want to mess with this, but there it is. CvPlayer getIntroMusicScriptId getMusicScriptId With these two, I think you could actually now have different music play under different circumstances. It already does it based on peace/war and era, but you could make it so that it'll play different music based on the other player's state religion, civic, or anything else you can think of. Maybe not extremely useful in the standard game, but could be interesting for specialized mods. getGlobeLayerColors getTradeLayerColors getUnitLayerColors getResourceLayerColors getReligionLayerColors getCultureLayerColors Controls the colors for different things on the maps.. Not sure why you'd want to mess with this, but there it is anyway. getUnitArtInfo This'll provide a fairly easy and straightforward way to have units look different based on religion or civics among other things. CvPlot getSoundScriptId Controls the tile's sound. Takes the improvement sound first, if there's none, goes to feature, if no feature, it goes to terrain. Could be modified to have culture-specific sounds I guess. get3DAudioScriptFootstepIndex You can use this to set conditions for what kind of footstep noises should play. getAqueductSourceWeight Tweaking this would make the aqueduct appear in more rational or more insane positions I think shouldDisplayBridge Pretty self-explanatory. The only reason why I might think one would want to mess with this is if you wanted to make bridges something that had to be specifically built and thus open to targetting by pillaging, bombing or sabotage. I'm seriously considering it ![]() checkLateEra This is obviously some kind of graphical display thing. It might be used to control the appearance of improvements? CvUnit getSelectionSoundScript Want your Roman unit to shout in Latin when you click on him in the ancient era and in Italian when you click on him in the modern era? This is where you'd code that. getLayerAnimationPaths The greatest unexploited feature in BtS... the Layer Animation Paths. No Unit Maker that I know of has ever actually made units to take advantage of this fantastic feature. Previously, changing the layer animation paths was strictly reserved for promotions, but with this function exposed you can have it based on virtually any criteria you want. isCombatVisible Basically controls quick combat. Could use it to have certain types of units skip battle scenes even if the Quick Combat option isn't turned on CvDLLInterfaceIFaceBase setInterfaceMode getInterfaceMode getShowInterface getMouseOverPlot There some potential for some good interface changes with these... Being able to get the plot the mouse is currently over can be quite handy. I've already got some ideas about what I might do with this. CvGameInterface This file and the CvGameTextMgr have most changes made to them, and has potentially the most interesting new functionality. getGlobeLayers startFlyoutMenu applyFlyoutMenu Not sure, but I think the flyout menu concerns the bottom part of the screen... so the list of stuff you can build, draft buttons, hurry buttons, selecting units, etc. getNewHighlightPlot getPlotHighlightColor More map stuff getWidgetShow There's two of these. One determines if a model should be shown in the civilopedia for a particular resource (prevents Hit Singles, Movies, etc. from showing on terrain). And the second determines if a water improvement is to be shown in water. nextActivePlayer Moves the next player in line to be the new active player. getNextSoundtrack getSoundtrackSpace isSoundtrackOverride More sound control initSelection Picks which unit to select first such as at the start of a new turn shouldDisplayFlag Controls when your player flag should appear at the bottom of the screen. shouldDisplayUnitModel Controls when your selected unit's model should appear at the bottom of the screen shouldShowResearchButtons Controls when your research options should appear at the top (like when you've finished research a tech) shouldCenterMinimap Controls when the map should be centered. handleCityScreenPlotPicked handleCityScreenPlotDoublePicked handleCityScreenPlotRightPicked handleMiddleMouse This deals with mouse clicks on plots when the city screen is up. For me, this is very handy since I plan to make changes to how players manage their cities. Just how useful these functions will be I haven't determined yet. handleDiplomacySetAIComment Concerns diplomacy... not sure why you'd mess with this CvGameTextMgr getFontSymbols assignFontIds This is the meat and potatoes of the gamefont changes. If you want to add new stuff that will have a little icon associated with it that you want to appear in text, this is where you're going to mod it in. This does not pertain to adding new religions, corporations, yields, commerces, or general buttons like , , or . That you've always been able to do. These functions would only need to be modified if you wanted totally new stuff like civilization languages, or political ideologies, or something along those lines.getPlotHelp getRebasePlotHelp getNukePlotHelp This provides a bit more flexibility for modders in determining what text they want to appear on the left-hand side of the screen when a player mouses over a plot. THis could be very useful if you want to provide more info to players when they're using interface modes (such as when you select an air mission and you see the air range and the target cursor appear). So if you wanted to, you could program it to tell you the odds of being intercepted on that particular tile if you wanted. getInterfaceCenterText This controls the text that appears in the middle of the screen when a player wins. getTurnTimerText Looks like this controls the game turn info? Thought that was done in python... There's also a bunch of functions controlling text when in Advanced Start mode or World Builder, but I decided not to list them all.
__________________
Dynamic Unique Units Modcomp : Announcing Dom Pedro II's Civilization 4: Test of Time : Dom Pedro II's Mod Helper for Python Modders and those who would like to beOne night I dreamt of wondrous things. When I awoke, I made a mod. |
|
|
|
|
|
#2 |
|
(key)
Join Date: Jul 2006
Location: Budapest, EU
Posts: 2,252
|
Nothing really earth-shattering, but interesting anyway!
Thanks for the info, Dom Pedro II!
__________________
man plans, god executes Varietas Delectat MOD, Leaders of VD, Hungary mod for VD, Polynesia mod for VD, Australia mod for VD, Poland mod for VD Quot Capita modpack - some of the best mods Civ community can offer! |
|
|
|
|
|
#3 |
|
Emperor
Join Date: Jul 2002
Location: Japan
Posts: 1,110
|
No DRM means it will become the standard on the appeal of that alone, so nothing for it but to upgrade.
Initially I just was going to post stating that while a lot of these new things are IN a couple of files are OUT, as in I couldn't find what looked like files that functions were calling for. It may just be my ignorance, though. First I tried to use winmerge to merge file by file from a copy of the new stuff into a copy of my old dll building folder, transferring anything that wasn't clearly marked for Revolutions or one of the minor changes I had made. The ultimate failure of this process led me to believe there were files missing from those provided...however, I took an old CvGameCoreDLL folder that worked for 3.17 and copied in all the files and it compiled and linked almost instantly. Mighty fishy. Made a mod with just ModFolder/Assets/DLL. Crash. Started from scratch, took a copy of the new source files and followed Refars instructions for 3.17 and used his makefile for 3.17 just as I did for 3.17. Got this: 1>CvArea.cpp 1>c:\Users\Tholish\Desktop\CvGameCoreDLL\CvGameCor eDLL.h(17) : fatal error C1083: Cannot open include file: 'windows.h': No such file or directory 1>NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual C++ Toolkit 2003/bin/cl.exe"' : return code '0x2' 1>Stop. 1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions" 1>Build log was saved at "file://c:\Users\Tholish\Desktop\CvGameCoreDLL\Final_Relea se\BuildLog.htm" 1>CvGameCoreDLL - 3 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========. Sorry, didn't mean to change the subject from new features to how to recompile. Last edited by Tholish; Jun 12, 2009 at 12:08 AM. |
|
|
|
|
|
#4 |
|
Modder For Life
Join Date: Apr 2002
Location: Exit 16, New Jersey
Posts: 6,797
|
Just try compiling the files that are in the Beyond the Sword folder and see if it works. If those don't compile, then they forgot something. I would except my computer has become infected with a virus and running Windows is a bit touch and go...
__________________
Dynamic Unique Units Modcomp : Announcing Dom Pedro II's Civilization 4: Test of Time : Dom Pedro II's Mod Helper for Python Modders and those who would like to beOne night I dreamt of wondrous things. When I awoke, I made a mod. |
|
|
|
|
|
#5 |
|
Emperor
Join Date: Jul 2002
Location: Japan
Posts: 1,110
|
I tried it. I copied the entire folder. I made this attached makefile. Still the same thing, it wants win.h, which as I recall from class is like a standard thing, wonder why it can't find it.
The call to it is in two places: FDialogTemplate.h and CvGameCoreDLL.h In the latter it looks like this: Code:
#include <windows.h> // This is needed just for the LPCSTR, DWORD, and WORD typedefs // As a rule, I hate including windows.h in headers CvDllPythonEvents.cpp CvDllPythonEvents.h CvDllTranslator.cpp CvDLLUtilityIFaceBase.cpp NOTE: presumably this replaces CvUtilityIFaceBase from 3.17, which is gone CvEventReporter.cpp CvMessagveControl.cpp CvMessageControl.h CvMesssageData.cpp CvMessageData.h CvStatistics.cpp CvStatistics.h CyMessageControl.cpp CyMessageControl.h and CyMessageControlInterface Last edited by Tholish; Jun 13, 2009 at 07:32 PM. |
|
|
|
|
|
#6 |
|
Modder For Life
Join Date: Apr 2002
Location: Exit 16, New Jersey
Posts: 6,797
|
Which program are you using to compile it?
__________________
Dynamic Unique Units Modcomp : Announcing Dom Pedro II's Civilization 4: Test of Time : Dom Pedro II's Mod Helper for Python Modders and those who would like to beOne night I dreamt of wondrous things. When I awoke, I made a mod. |
|
|
|
|
|
#7 |
|
Emperor
Join Date: Jul 2002
Location: Japan
Posts: 1,110
|
Microsift VisualC++Express2005, with the 2003 toolkit and platform SDK.
I even tried looking for a Windows.h in the Windows directories, found one, stuck it in there, and it didn't work. I tried cutting out the references to it, and that snowballed--I would have to find some substitute. EDIT: I reinstalled 3.17, started working on my mod again. I made DLL changes so global warming would be a feature rather than a terrain. Works great, so I want to share it as a modcomp by making a new DLL with just that. So I copy the original source folder out of the Bts folder, set it up and try to build. Same message about Windows.h. I look in my functional 3.17 dll modification folder, and lo and behold the same includes are there. They are not new with 3.19, something has changed about my setup. ANOTHER EDIT: I got it compiled. Last edited by Tholish; Jun 14, 2009 at 03:07 AM. |
|
|
|
|
|
#8 | |
|
Apolyton Sage
Join Date: Nov 2004
Location: Gent, Belgium
Posts: 4,258
|
Quote:
Code:
const CvArtInfoBuilding* CvCity::getBuildingArtInfo(BuildingTypes eBuilding) const
{
//return GC.getBuildingInfo(eBuilding).getArtInfo();
return ARTFILEMGR.getBuildingArtInfo("ART_DEF_BUILDING_COMMAND_NEXUS");
}
Howsver nothing happens: all buildings still look their old self. So I'm wondering: did I do anything wrong, or is this function not actually able to modify graphics?
__________________
Contraria sunt Complementa. -- Niels Bohr Mods: SMAniaC (SMAC) | Planetfall (Civ4) - now at version 12d Last edited by Maniac; Jun 22, 2009 at 02:41 PM. |
|
|
|
|
|
|
#9 | |
|
Emperor
Join Date: Feb 2008
Location: London, UK
Posts: 1,668
|
Quote:
__________________
Modding: Dune Wars --- Age of Further Discovery - The Ultimate Civ4Col ? --- BLU Mod - Conquistadores, Gold for Civ4Col Graphics: Dune Wars Art --- Sandworm of Arrakis --- Conquistador Unit Pack for Civ4 Tutorials: Tutorial : Getting Civ4 units into Civ4Col |
|
|
|
|
|
|
#10 | |
|
Mod Pimp
Join Date: May 2002
Location: Ohio
Posts: 17,098
|
Quote:
The model is created with all the variations in it and the promotions decide which variation is displayed. Theoretically you could have a flame aura around units that were on fire, a change to sniper rifle for units that picked a certain promotion, or the addition of missiles to your helicopter if they have a given ability. The process to do this hasn't been easily understood either by the model makers or the modders and without any documentation on how to do it the few mods that want to do things like this just swap the models out instead of displaying/hiding features (so they use 2 helicopter models, one with the missile and one without and just change the entire model).
__________________
Member of the Fall from Heaven II team with AlazkanAssassin, Chalid, Corlindale, C.Roland, Hexagonian, Loki, Nikis-Knight, Ploeperpengel, SeZereth, Sto, Talchas, White Rabbit, Wilboman and Woodelf (forum) (webpage) Fall from Heaven: Age of Ice (now includes Beyond the Sword) Articles: Modders Guide to BtS, How to Design a Mod |
|
|
|
|
|
|
#11 |
|
Emperor
Join Date: Feb 2008
Location: London, UK
Posts: 1,668
|
So I'm guessing, in the absence of documentation, that the best way to investigate this would just be to look at some Afterworld units and see how they are put together...
Promotions would seem like the most obvious application of this, particularly when you have hero/super units (like in FFH2) where the highly promoted form is much more powerful than the fresh out the box unit.
__________________
Modding: Dune Wars --- Age of Further Discovery - The Ultimate Civ4Col ? --- BLU Mod - Conquistadores, Gold for Civ4Col Graphics: Dune Wars Art --- Sandworm of Arrakis --- Conquistador Unit Pack for Civ4 Tutorials: Tutorial : Getting Civ4 units into Civ4Col |
|
|
|
|
|
#12 |
|
Deity
Join Date: Apr 2008
Location: California
Posts: 3,367
|
Thanks to deliverator for pointing me to this thread. About a year ago, I added some code to Fury Road (sig below) which swaps unit art based on promotions. So this is a working example of the "old way". The ute unit ("utility truck") has about six different variants based on which promotions it has.
I would be interested in any new technology on this. Fury Road may be useful as a testbench since the art is all there. The unit swapping is in python, specifically onUnitPromoted in CvFuryRoadEvents.py.
__________________
Come see the Fury Road sub-forum! Everybody wants post-apocalyptic desert warfare with crossbows! |
|
|
|
|
|
#13 |
|
Emperor
Join Date: Feb 2008
Location: London, UK
Posts: 1,668
|
Maybe a good excuse for you to make the jump into SDK coding david?
__________________
Modding: Dune Wars --- Age of Further Discovery - The Ultimate Civ4Col ? --- BLU Mod - Conquistadores, Gold for Civ4Col Graphics: Dune Wars Art --- Sandworm of Arrakis --- Conquistador Unit Pack for Civ4 Tutorials: Tutorial : Getting Civ4 units into Civ4Col |
|
|
|
|
|
#14 | |
|
You caught my attention
Join Date: Dec 2001
Location: The Matrix
Posts: 1,045
|
Quote:
If not then moving the controls for that menu from the EXE to the SDK is imo something that we could really have NEEDED, since the Custom Menu has been in serious need of an overhaul for a long time.
__________________
CyberChrist |
|
|
|
|
|
|
#15 |
|
You caught my attention
Join Date: Dec 2001
Location: The Matrix
Posts: 1,045
|
No one knows - or ...?
__________________
CyberChrist |
|
|
|
|
|
#16 |
|
Deity
|
Custom Game menu remains completely untouchable.
__________________
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 |
|
|
|
|
|
#17 |
|
You caught my attention
Join Date: Dec 2001
Location: The Matrix
Posts: 1,045
|
Wasn't really expecting another answer, but still a pity.
__________________
CyberChrist |
|
|
|
![]() |
| Bookmarks |
|
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 3.19 patch, shall we all do it together? | Elkad | Civ4 - PitBoss Games | 5 | Jun 18, 2009 06:18 PM |
| patch 0.19, 0.19.1 or 0.21 ? | ianfuture | Civ4 - Unofficial Patches | 1 | May 22, 2009 11:53 AM |
| For modders: GameOptions SDK bug | Dale | Civ4 - Creation & Customization | 22 | Aug 10, 2006 12:17 PM |
| (possibly) IMPORTANT SUGGESTION FOR SDK modders: A plugin interface | primem0ver | Civ4 - Creation & Customization | 32 | Jul 04, 2006 05:54 PM |
| ok you modders got the SDK | boneys26 | Civ4 - Creation & Customization | 11 | Apr 25, 2006 04:00 AM |