Posted: Fri May 22, 2009 11:06 pm Post subject:
A couple specific modding questions
I have entirely too much experience modding Zero Hour, but I'm still learning my way around C&C3's new xml language and architecture. Please accept my apologies in advance if I ask anything particularly stupid.
I've been doing a lot of re-balancing of the base defenses, but there's one thing I just can't seem to get working.
The GDIWatchTower might be an effective anti-infantry defense if C&C3 didn't use squads. But it does, and this exposes a huge flaw in the Watch Tower: it takes about as long switching targets after killing one as it takes to kill the target in the first place. As a result, it's only actually firing about half the time, which is hugely inefficient. I've tried most things I can think of to get rid of this re-targeting delay, but nothing has worked. So far, I've tried:
As a comparison, the GDICommando can often wipe out an entire infantry squad in under a second. Partly, this is because he does vastly more damage (500 per shot vs 15), but what's equally important is that he has no observable delay whatsoever when switching targets after killing each of them. Many of the changes I've tried were inspired by comparing the Watch Tower to the Commando, but I'm rapidly running out of differences, and those that remain seem unlikely to help. So, my first question:
1) Does anybody know how I can change the GDIWatchTower's delay when auto-acquiring a new target?
And while we're near the subject,
2) When a WeaponTemplate doesn't specify a FiringDuration, what's the default? I haven't found that anywhere in the schema.
And now for something completely different. I've been trying to increase the amount of resources that can be harvested from any given tiberium field, but without affecting the rate at which they can be harvested. I would prefer to simply increase the tiberium re-growth rate, but I saw no difference whatsoever with the following changes:
-In each TiberiumField (except Seeded): changed CrystalGrowthRate=20->200
-In TiberiumCrystal and TiberiumCrystalBlue: changed TimeBetweenGrowthStages=30(60 for Blue)s->3s
Failing that, I tried simply increasing the value of each cluster with:
-In TiberiumCrystal and TiberiumCrystalBlue: changed NumBoxes=50->100000
That caused each tiberium field to consist of only one cluster (albeit PACKED with resources) instead of the normal circle consisting of many clusters. I tried adding this change:
-In each TiberiumField (except Seeded): changed MaxFieldMoney=25000->7200000, StartingFieldMoney=25000->7200000
...but that made exactly no difference. So,
3) What actually determines the growth rate of tiberium?
4) How can I increase the total value of a tiberium field without reducing the number of clusters in it?
Before you ask, I've gotten plenty of other changes to work, so I do know how to build and run a mod.
Any help you can give is greatly appreciated. Thanks in advance! QUICK_EDIT
Tberium's spread rate is covered individually in every field on every map in the Worldbuilder if I recall correctly. When you change those values you were speaking of, that's only changing the default values for any new fields you place in WB. Any fields already on the map don't have the changes except for the ones you already listed as taking effect. (Again, IIRC.) _________________ WOL nick: migtybob
Dang, I was afraid it would be something like that. I think I read somewhere that CameraMaxHeight (which I would like to increase, since EA's default max always feels too low to me) also works that way in C&C3--individualized to each map, instead of being set for all maps simultaneously in GameData.ini as it was in Zero Hour. Oh well, it'll just take more work this way, comparable to adding a new AI faction player to each map in Zero Hour. Or maybe I'll start with a quick-fix by allowing each faction to build a GrowthAccelerator with beefed-up TiberiumGrowthModBehavior multipliers.
So...I've been going through various forums, trying to cobble together an understanding of the Kane's Wrath modding situation. Am I correct that there is no Mod SDK for KW, probably never will be, and that without it, there's basically no way to mod KW at all? Is it possible to make any changes to KW? If not, I doubt I'm the first person to express an interest in extracting as much of the unique content from KW as possible and modding it into TW. Do you know if it can be done? Has it been done already? I haven't been able to nail down these answers from what I've read.
One more thing I'm not clear on: what's the deal with BuildModCivAsset.bat? I gather that it's necessary for modifications to "civilian assets," but what exactly do those include? And does it need to be used instead of BuildMod.bat or somehow in addition to it? Does it do everything BuildMod.bat does and more? If so, would there ever be any compelling reason to use BuildMod.bat instead, or could I just always use BuildModCivAsset.bat to be safe?
I think I read somewhere that CameraMaxHeight (which I would like to increase, since EA's default max always feels too low to me) also works that way in C&C3--individualized to each map, instead of being set for all maps simultaneously in GameData.ini as it was in Zero Hour.
Yeah the cameras are farked too.
Or maybe I'll start with a quick-fix by allowing each faction to build a GrowthAccelerator with beefed-up TiberiumGrowthModBehavior multipliers.
Random thought: I wonder if it would be possible to get the fields to spawn a neutral invisible, stationary, dummy object that acts like a growth accelerator. That way you get the appearance of the effect you were originally trying for.
So...I've been going through various forums, trying to cobble together an understanding of the Kane's Wrath modding situation. Am I correct that there is no Mod SDK for KW, probably never will be, and that without it, there's basically no way to mod KW at all? Is it possible to make any changes to KW? If not, I doubt I'm the first person to express an interest in extracting as much of the unique content from KW as possible and modding it into TW. Do you know if it can be done? Has it been done already? I haven't been able to nail down these answers from what I've read.
There's no SDK, there won't ever be an SDK, EA might release some of the art in packs like they did for TW, but don't hold your breath.
Using jonwil's SDK Extras and 3D Ripper DX you can rip out some of the models, textures, and sounds, but none of the code or animations or music. So everything would have to be re-rigged, re-animated, and re-coded.
He's made a tool that lets you integrate Uprising art into RA3, maybe he could do the same with KW and TW, although it might be harder. Who knows.
One more thing I'm not clear on: what's the deal with BuildModCivAsset.bat? I gather that it's necessary for modifications to "civilian assets," but what exactly do those include? And does it need to be used instead of BuildMod.bat or somehow in addition to it? Does it do everything BuildMod.bat does and more? If so, would there ever be any compelling reason to use BuildMod.bat instead, or could I just always use BuildModCivAsset.bat to be safe?
Anything that isn't GDI, Nod, or Scrin counts as a civilian asset. So do any of the campaign-only GDI/Nod/Scrin structures.
The second buildmod is used instead of the regular one, not in addition to it. It does everything the regular one does and the extra resolving of civilian stuff. I don't know if there are any negative reasons to not use it at all times.
Well, I've got my quick-and-dirty all-factions-buildable AdvTibGrowthAccelerator done, but I'm still testing it. I've got the multipliers set to 10, which I figured would make a huge difference, but I'm still exhausting tib fields pretty quickly with just two harvesters each, so I'm not convinced it's working. I don't see why it wouldn't, unless the original Scrin GrowthAccelerator never actually worked, either, since this is a pretty straight copy. Anyway, I'll try again with multipliers at 100 and see if there's any difference.
Quote:
Random thought: I wonder if it would be possible to get the fields to spawn a neutral invisible, stationary, dummy object that acts like a growth accelerator. That way you get the appearance of the effect you were originally trying for.
If this were Zero Hour, I'd do it by giving each TiberiumField code object a FireWeaponWhenDamagedBehavior with ContinuousWeapon[Pristine thru Rubble] set to a weapon that just FireOCL'd said dummy object and had a near-infinite DelayBetweenShots. That way, each field should fire the weapon once, immediately upon starting a match, then never again. It looks like all that should still be possible in C&C3, although we'd need to swap FireOCL for WeaponOCLNuggetType and DelayBetweenShots for FiringDuration (I'd prefer ClipReloadTime, but I think I recall FWWDamagedB ContinuousWeapons ignoring Clip limitations in ZH, so I wouldn't trust them not to here). Of course, if TiberiumGrowthModBehavior doesn't actually work, then it won't do us any good, even if the dummy is successfully OCL'd. I also don't know whether TiberiumGrowthModBehavior might require a specific location within the field that might be difficult to arrange blindly via OCL, but we can try.
And failing that, I can always adjust each field in each map, as you originally suggested. Heck, I probably might as well, since I'll need to edit each map for CameraHeight, anyway. But now I'm curious about your growth-acceleration-dummy idea...
Quote:
So everything would have to be re-rigged, re-animated, and re-coded.
Crud. I'm a decent coder, but I'm no modeler. I don't think I have the chops to pull off rigging and animation. I'll try the tutorials and see if I can get anywhere...
I think I read somewhere that APOC might release KW's xml in a viewable, albeit still non-moddable, form...do you know if that ever happened? It would be nice to at least see what I'm trying to replicate.
Quote:
The second buildmod is used instead of the regular one, not in addition to it. It does everything the regular one does and the extra resolving of civilian stuff. I don't know if there are any negative reasons to not use it at all times.
Thanks for clearing that up. I'll start regularly using BuildModCivAsset.bat and report back if I have any problems because of it.
Note that you can in fact change the tiberium settings by having the fields automatically replace themselfs when the game starts (you can set this globally in the XMLs and the spawned fields use the default settings you made in the XMLs too).
For example, you can add this to the tiberium fields to make it replace itself:
And creating a copy of the TiberiumField object with the ID TiberiumFieldOverwrite. This might however cause problems with the AI - I'd suggest testing it thoroughly. _________________ Off Duty. QUICK_EDIT
TiberiumGrowthModBehavior at 100 seems to be having some small effect, but it's still not enough to keep up with even two harvesters. I find that surprising, but I suppose it's ultimately unimportant if Golan's idea works. I'd prefer not to require building/placing a GrowthAccelerator, anyway.
I added the LifetimeUpdate and COD modules to each of the three TiberiumField types (not included "Seeded," since allowing players to spread virtually irremovable tiberium at will seems unwise). Each now immediately replaces itself with an "OPlenty" version of the same field, with increased GrowthRate and Starting and Max Money. Each OPlenty field, in turn, is told to spawn an "OPlenty" version of the TiberiumCrystal it would normally use, with NumBoxes=100000 and reduced TimeBetweenGrowthStages. The expected end result would be tiberium fields which can be heavily harvested without ever really reducing the field size or resource pool.
In one skirmish test, it worked pretty well. The fields were the correct size and harvesting had virtually no impact on them. One of my fields did eventually lose most of its bottom half, but it was hit with several catalyst missiles and a tiberium vapor bomb in that area--is either of those supposed to actually destroy tiberium? If so, that could explain what happened.
The AI had no difficulty recognizing and harvesting the replacement fields.
There was one small problem; once a harvester reached its target point and began actually harvesting, it would gather its full load much faster than usual--in just a second or two. While I wanted the resource gathering rate to remain unchanged, this is still only a relatively small overall difference, so I can live with it. If need be, I suppose I can try increasing their HarvestActionTime to compensate.
I can also anticipate some trouble with fields intended to have special characteristics/shapes, such as the blue tiberium "river" in GDI's final SP mission, Ground Zero, since this method will presumably overwrite all map-specific data for tiberium fields (which was, admittedly, the point of doing it this way). Won't know for sure until I check.
BTW, does anyone know if it's possible to require the AI to be able to see its intended target in order to use a special power, in the way that human players have to? It's incredibly annoying that the AI can freely blast me with perfectly targeted catalyst missiles even though I never let his units anywhere near my refineries, yet I can't return the favor without sending some luckless aircraft on a suicide mission first. I know there was no way around this in Zero Hour, but the AI system looks to have been completely redone for C&C3, and I haven't had time to figure it out yet. QUICK_EDIT
The Tiberium "river" shouldn't be affected I think because the Tiberium's non-growable tiles are painted in the Worldbuilder and are not affected by the field object itself. _________________ WOL nick: migtybob
Right you are, Mighty BOB; I checked the Ground Zero mission, and the tiberium "river" is fine despite the field replacement mod.
Field replacement has continued to hold up pretty well in tests, though I occassionally come across a field that doesn't seem to have made the switch. Perhaps the problem ones are not real fields but instead, as Mighty BOB says, collections of tiberium tiles that just look like fields. It hasn't been a big problem yet (there have always been plenty of other fields that did switch).
The one major problem is one I found while looking through the AI: each personality has a setting for Expansion_MaxTiberiumRemaining which determines the total nearby tiberium value below which they will try to expand. Since there is now so much more value in every field, presumably the AI will never/rarely feel any need to expand, which can make it much easier to defeat. Of course, the solution is simple--just increase Expansion_MaxTiberiumRemaining for each personality.
Alright, here's a very important question: Does anyone know if/where the default .str entries for in-game description text, etc. are located? I gather that I can overwrite/add such entries in mod.str, but without seeing the originals, I don't know what syntax to use. The SampleMod examples are extremely simplified, so they're not very helpful. I suspect there is some way to reference/include other .str entries from within any given .str entry, since many object descriptions include stock phrases that appear to be exactly the same from object to object, and judging from Zero Hour, if each .str entry was unrelated, there probably would have been numerous small (and not-so-small) differences.
Alright, the way this game does ExperienceLevelTemplates is rather different from ZH, and vastly more bloated and irritating.
I had no particular trouble figuring out how to allow base defenses to gain veterancy, and that worked fine for the existing defenses. More recently however, I've created a new faction with new units, and they're having some experience-related troubles. They do gain experience according to the templates I've made for them, and they do appear to get the proper attribute modifiers and such, but they don't show their veterancy level normally. You can see the level marker for a single, selected unit in the info box at bottom right of the HUD, but they all use the GDI markers (chevrons/star), whether or not that was intended, and none of them show their veterancy marks in the main screen next to their life bars as they should. It's more an annoyance than a functional problem, but I'd still like to solve it.
The only experience-related changes I've made are in ExperienceLevels.xml, so if there's another file[s] I need to work with, I don't know about it.
I start to go cross-eyed whenever I have to deal with art stuff, so if anyone could clue me in on what I'm missing, it would be a great help. Thanks! QUICK_EDIT
Sheesh, that's ridiculous (@ EA, not you, Golan). But I guess I shouldn't have expected any better.
I can get veterancy to display properly again by changing Side= in each GameObject definition back to one of the three original factions (GDI, NOD, ALIEN) rather than my new faction. Does anyone know if there will be any consequences for defining the "wrong" side for these objects? IIRC, in ZH the only thing "Side" determined was where the object was listed in WB. It obviously does at least one more thing (veterancy) in C&C3, but does it do anything else I might not expect?
I'm starting to get a lot of seemingly random crashes, both when initially loading the game, and while playing. Debugging them is killing me, because I can't find any information about what's causing the crashes. In ZH, every crash would write a ReleaseCrashInfo.txt in My Documents\Command and Conquer Generals Zero Hour Data, which would usually at least point me in the right direction. Is there anything like that in C&C3? All I've got is the Build Output from setting gui:true in BuildMod[CivAsset].bat, which apparently doesn't catch a lot of these crashes.
The Side= setting only affects minor stuff, there's nothing gameplay-relevant to it. If you are planning to have more than the original three sides, it's a good idea to just set all objects to the same Side= codewise.
There sadly isn't anything like ReleaseCrashInfo.txt in TW, but the compiler will list any invalid and missing pieces in your mod. There are however a couple of things it cannot spot, namely LogicCommandSet issues (empty buttons and the like will crash the game) and incorrectly assigned Animation- and ModelConditionStates (for example, having two default states in one draw crashes the game).
The best approach for debugging is IMO to simply start a skirmish without AI and test the complete tech-tree of a faction. Make sure to check LogicCommandSets on all construction buildings and test every unit's attack and death.
If you can't pinpoint the error this way (for example, some things will cause a crash when used by the AI -extremely rare-), you should try deactivating your mod's changes step by step and check when the error doesn't occur anymore.
Still, it's a lot of work... _________________ Off Duty. QUICK_EDIT
The Side= setting only affects minor stuff, there's nothing gameplay-relevant to it.
Great! That's one less thing to worry about. Thanks!
Quote:
There sadly isn't anything like ReleaseCrashInfo.txt in TW
$@^%. That's disappointing. Thanks for telling me, though; at least I know, now.
Quote:
you should try deactivating your mod's changes step by step and check when the error doesn't occur anymore.
This is what I've been doing...
Quote:
simply start a skirmish without AI and test the complete tech-tree of a faction.
...but this is good advice. I had considered and dismissed it because it's soooo...booooring...but maybe I just needed someone else to say it to remind me that it's worthwhile, regardless.
I've determined that the latest crash is being caused by something to do with my new faction's Surveyor and/or Outpost (it crashes every time they're in, but doesn't when they're not, so...), but I can't think of any reason they wouldn't work. I'm not doing anything fancy, yet; they're nearly unchanged copies of the GDI versions. The ONLY changes I've made are:
Surveyor:
-file name
-id
-EditorName
-GameDependency
-ReplacementTemplate
Outpost:
-file name
-id
-EditorName
-added an AutoHealBehavior to automate the repair process (which works fine on all my other structures)
I also copied the LogicCommand that builds the GDISurveyor, changed the id and Object, and put the new command in the LogicCommandSet for my new faction's ConstructionYard.
I've changed nothing else related to those objects, I can't find any errors in those changes, and yet they are definitely the difference between crashing and not.
To further the inexplicability, I have no difficulty building the Surveyor or deploying it into an Outpost in-game. I build and deploy two immediately at the start of each match, yet the crash always happens ~10-15 minutes in, long after that. I'm reasonably certain the Outposts are never coming under enemy fire, either, so I don't think it can be anything related to damage/death.
Am I overlooking something?
Quote:
for example, some things will cause a crash when used by the AI -extremely rare
This is one of the things I've wondered about as a possible culprit in this and other cases. Since the Surveyor/Outpost seem to work fine for quite a while, is it possible that the AI is reacting to them in some broken way that causes a crash? I haven't examined the AI very closely yet; would it even be possible for it to crash based on something another player does? Or would the AI only crash if it was the one building something broken?
Quote:
Still, it's a lot of work...
Yeah... I don't really mind that much, so long as the problem is one I can uncover through the application of logic. What bothers me is when the problem doesn't make sense, or only makes sense if you have information which the developers didn't share with us, because then I can't reasonably expect to solve it.
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum