Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
So based on fact that it is primarily only values changes I have made, I believe it isn't something that I have done to the lines of code themselves, because I haven't really actually altered them (aside from some minor adding of spaces to make the lines in CONST.CPP easier to read for the changes I made to the weapon ranges of the different weapon systems in the game, like the sniper rifle for example, or making a few things (MTANK, GTWR, SAM) accessible to both factions that previously were only available to one, or the other), nor have I deleted any of them.
I will continue to look at the code, and INI, to see if I can resolve the issues I am having with the building gap and veterancy functions, but any input or suggestions you may have Chthon will be welcomed, cause this is something that you are far more familiar and knowledgeable with than I am.
Update (12 April 2022):
With further thinking, and testing, I've resolved the issues with the Bazooka soldier and the Guard Tower that I mentioned above, but the building gap change is still not working.
Update (13 April 2022):
I'm still only getting a 1 tile gap, and I can't build off of the sandbag wall either despite having the INI settings correctly changed as per the GitHub webpage's instructions, plus changing the false values to true in the EXTERNS.H file to reflect those settings as configured in the INI file hasn't made any difference to those functions working as desired, or even at all. Subsequently realised I shouldn't have altered anything in the EXTERNS.H file so I have returned that file to its default state and updated my tweaked DLL accordingly, but even after correcting that mistake I am still finding that the Veterancy system is refusing to work with my tweaked DLL file when it's replacing the mod's default DLL.
Update again (14 April 2022):
No progress on getting the building gap INI changes working for me. It's still only allowing a 1 tile gap regardless of what values changes I make to the INI file, even before I make the personal preference tweaks that I want to make. And I'm also noticing that the Veterancy system doesn't appear to like me making the personal preference tweaks I've been making either, as it is also not working once I compile the changes. Thing is, I haven't altered the actual source code or other DLL code lines at all, as outlined above.
Update again (15 April 2022):
Setting the INI's entry for BUILDING_GAP= to 1, and VETERANCY= to 0 made no difference either. I was still able to build with a gap of 1 tile, which was not meant to be possible with that setting, and the Veterancy being turned off in the INI didn't seem to make any difference compared to if I have it turned on in the INI for the issue I reported above.
I know setting it to 0 meant Veterancy was technically turned off, but I was kinda hoping it would somehow have had the opposite effect and mysteriously caused it to in fact be turned on, but clearly that idea didn't work, which logically makes sense anyway.
Update yet again (late 15 April 2022):
Discovered I had been editing the wrong INI file the whole time, and once I edited the correct 1 the building gap issue outlined in the above entries has been resolved, but I am still finding that the Veterancy system is not working, so clearly something I have edited in the DLL has caused that issue, but I touched nothing that was obviously linked with the Veterancy system when making my preference tweaks so for the life of me I cannot think of or find what the cause of the Veterancy issue is.
Update (14 April 2022):
You can disregard that harvester capacity question, I've found the relevant file and the relevant part within it to make that desired change. The code is located in the Type.H file beginning at line 869.
I only increased the value per bail from 25 to 30, causing the harvester to collect a total value of 840 credits worth of tiberium per load, up 140 from the default 700 credits worth of tiberium.
In the Veterancy mod it's easy to do in that mod's main rules ini file, but obviously this mod's ini file functions very differently to the Veterancy mod one and is not designed to work the same way.
First, set IsTransporter to true in UDATA.CPP. And tweak Max_Passengers() in TECHNO.CPP to give a different answer for tanks. You might have to do something to deal with the door open/close logic in UNIT.CPP and maybe some other scattered stuff that just expects APCs are the only ground transport type. (This might require a lot of debugging and searching, or maybe none.)
Now, the hard part is making the passengers shoot. I can think of 3 ways to do this. The first is likely the best.
Option A: Clone the tank unit type to a new unit type for the tank+gunner. Give it the machine gun as a secondary weapon. Then hot-swap the tank's unit type during the passenger load and unload operations. If you want to do the RA2 thing with different infantry resulting in different weapons, you'll need multiple clones. See the Nuke Tank tutorial for how to do this.
Option B: Add some logic to the tank's AI loop to check for when the gunner should fire. When that happens, create an invisible unit with a machine gun at the tank's location to do the actual firing, then destroy it once it fires. (This is how the vortex in RA works.)
Option C: Same as B, but unlimbo the actual infantry unit at the tank's location in an invisible state, then relimbo it after it fires.
Aside: If you're going to do serious digging around to find "everything that touches X," you need a search tool for that. On Linux, grep is ideal. Assuming you're using Windows, you should find yourself a grep alternative.
And I'm well aware of the Veterancy mod's author being noncompliant with the license requirement to upload his sourcecode, something that is deplorable to me too. That non-compliance is just one reason why I'm wanting to learn how to do these personal preference changes for my personal use using your mod's structure and architecture, because A) you're helping me by willingly answering my questions, which I truly do appreciate, B) your mod is well balanced as a result of the work you and your predecessors have put into developing it, and C) that Veterancy mod could be shut down at any moment for that non-compliance which would therefore eliminate it as a viable alternative to use instead of the NCO mod, which doesn't seem to be being developed any more.
Or do I replicate the code from BuildingClass::Grand_Opening() in BUILDING.CPP but then incorporate the Scan_Place_Object() code in the replicated BuildingClass::Grand_Opening() code to replace the original code?
I've been looking at the code in both files that you directed me to look at, but I'm not sure which approach to take in making this desired change work, or which is the better approach to take, and I'm hesitant to change anything lest it causes all sorts of unforeseeable problems. I always back up files before I edit them, but even then I'm still hesitant to actually add new code or change the code's structure, without having a very clear idea of what to do anyway.
unit = new UnitClass(UNIT_HARVESTER, House->Class->House);
if (unit) {
if (!Scan_Place_Object(unit, Coord_Cell(Center_Coord()))){
House->Refund_Money(unit->Class->Cost_Of());
delete unit;
}
}
else {
House->Refund_Money(UnitTypeClass::As_Reference(UNIT_HARVESTER).Cost_Of());
}
Also, be aware that you're creating a situation where AI players can sell back a $2000 investment for $3400 and human players can sell it back for $1700. If that causes balance problems, you might need to change the price on something or alter the resale logic.
How can I get the AI to rebuild buildings in missions where otherwise it is coded to not rebuild them?
For example, in GDI mission 7A, Destroy the Airfield, if you destroyed the airfield in the previous commando only mission, the AI won't rebuild it, or anything else for that matter, preventing it from training new vehicles, or rebuilding defensive structures after you have launched an attack but not broken through, when it otherwise has the resources to do so.
I noticed it would train new replacement harvesters and other vehicles if you didn't destroy the airfield in that previous mission, but it would not rebuild structures, like turrets or even the refinery for example, even if you did not destroy the Con Yard in that commando only mission.
Again, thank you for your guidance and willingness to help, it is fantastic and I really appreciate it, especially as I know from reading comments in the comments section that you are doing this mod in your spare time in between your family and work commitments.
1. When the mission is loaded, the [BASE] section of the ini file is read out to make a list of nodes and associated cells and building types. See BASE.CPP
2. Specifically for GDI 7, whatever building was sabotaged is deleted, and then the associated node is also deleted. This is handled in SCENARIO.CPP
3. The AI player's logic in HOUSE.CPP periodically scans the node list for the first node that doesn't have a building on its cell, and then tries to rebuild the associated building. (Side note: It doesn't care about who owns the building. If it's in the list, the AI will rebuild it.)
So, if you want to make the AI rebuild something, you need to add it to the node list somewhere. You could edit the mission file. Or you could add a one-time scan for enemy buildings that don't have nodes and give them one. If you want to change GDI 7, you need to dink with the special code that's deleting the node.