Civilians V2 Useful civilians mod

Everything about mods can be found here.

Moderator: Morax

Civilians V2 Useful civilians mod

Postby RavenCurow » 29 Aug 2016, 00:28

Greetings ladies and gents. After many helpful tips from the modding community here Ive decided to release the updated version of my civilian buildings mod to be compatible with the current faf build. In traditional warfare a countries population plays a large roll in supplying the military with arms, vehicles and supplies. Now thanks to this mod the civilians in Forged Alliance will finally begin to pull their weight and assist your war efforts. Now without further ado the unit lists.

Buildings for all factions.

Tech 1 Residential structures
These niffty buildings are adjacency whores. Like real residential structures they plug into the grid no matter what you place next to them giving a small adjacency bonus to those structures. These buildings are cheap and don't produce anything on their own, but help your base perform at optimal efficiency.

Tech 2 Manufacturing Facility
These handy buildings plug into your engineering structures such as factories and hives reducing the mass cost of anything they build by offering T3 Mex adjacency bonuses. Now these building take up the same amount of room as a T2 pgens so you'll only get one for each side. Great for factory grids.

Tech 2.5 Science Facility Experimental Power Generator
The name says it all. These science facilities function as higher costing pgens that give a power output of 1500/s. Better than a regular T2 but not replacing the T3.

Tech 2 Experimental Radar System
These buildings off a larger Radar range than the standard T2 Radar at a higher cost of resources in build cost and energy consumption. They also aren't Omni generators so you'll still need those at T3.

Tech 2 Experimental Stealth Generator
For when you absolutely positively. Have to hide every building in your base from Radar. Debug note: For some reason I can't get these buildings to turn on immediately when built so you have to turn them off and then on to get them to work. If anyone can tell me what's wrong with them I would be grateful. Otherwise they work as intended.

EDIT: These have been fixed before upload and this no longer applies.

Tech 3 MassFabricationStorage
This building is a hybrid mass fabricator and mass storage. It is as large as a factory so I may buff it later if it seems to not be worth building.

Now for the factional buildings. Because some factions have more civ buildings than other some won't have as many. Not much I can do without more models.

Aeon

T1 Hydrocarbon Perimeter Monitoring System.
These niffty buildings function like a lesser version of the Cybran T3 building; however, they don't take cost any energy to use. The downside is they take up your Hydrocarbon spot so they are area specific and can't be used on some maps at all!

Cybran
Cybran definitely get the most love when it comes to the number of civilian buildings

Tech 1 Admin Building cloak field Generator.
Thus building is great for hiding forward defense outposts early game. It generates a small cloak field around it hiding everything under it from sight.

Tech2 Cybran Network Node
This building acts as a power distribution node effectively reducing the power consumption of buildings plugged into it as well as increasing the ROF of artillery. This building doesn't produce any resources if it's own, but it's adjacency is greater than a T3 power plant.

Tech3 QAI secondary mainframe
Brackman has finally gotten the rouge AI under control. This mainframe increases the efficiency of all buildings plugged into it by conferring every T3 adjacency bonus. It's quite a large building though so you'll have to use the space wisely.

QAI Mainframe Experimental Omni Jammer
The piece de resistance of Brackman tech the QAI Mainframe emits a quantum pulse jamming all Omni in range. Each pulse effectively reduces the range of all Omni generators making them ineffective.

UEF

Tech 1 Hydrocarbon Perimeter Monitoring System

Works like the Aeon building of the same type, but the UEF have added a small shield to it. Effective at holding off T1 units but will buckle under sustained fire

Seraphim
Yes the seraphim get some love in this mod.

Tech 1 Regen Field Generator
These little buildings increase the Regen rate of anything next to them in a small radius for the cost of power.

Tech 3 Experimental Power Plant
Instead of a Tech2.5 power plant the Seraphim have created a high powered plant that produces even more power than a Tech 3 pgens for a substantial build cost.

Now for my pet project buildings. I learned to mod coding these buildings so they may be a little OP. Based On feedback I may move them around the tech tree. These are only available to the Aeon and UEF factions.

Tech 1 Experimental Command Suite
Thus building is my master piece. It basically acts like a stationary commander with the Cybran hives assist ability. It has its own upgrade patches and can upgrade it's building tech all the way to tech 3. This building can also plug into any building in your grid. Takes quite a long time to build for a Tech 1 building too at 90 seconds.

So there you have it. I'll be uploading it to the Vault in the morning. Feel free to tell me what you think. Bear in mind this mod is probably not completely balanced.

Link for the mod: https://www.dropbox.com/s/g9xun3n1zu09ur9/CiviliansV2.zip?dl=0

Changelog
Version 1.1
Many bug fixes thanks to Uveso's debugging.
The Manufacturing Facilities that each race can build have been repurposed for a completely new mechanic. These buildings now function as T2 mass storage, but instead of mass storage adjacency they have a completely new adjacency mechanic. These buildings will give a build rate bonus when plugged into any building that can build units or that can upgrade to a new unit (i.e. shields, mexes, etc.). This feature is still being tested so let me know what you think. This build rate adjacency is also included in the adjacencies offered by the residential buildings and the T3 QAI secondary mainframe.

Version 1.2
Added unit descriptions for all buildings and streamlined the buildrate adjacency code.
Last edited by RavenCurow on 09 Sep 2016, 07:11, edited 7 times in total.
RavenCurow
Avatar-of-War
 
Posts: 98
Joined: 30 Oct 2014, 01:17
Has liked: 1 time
Been liked: 14 times
FAF User Name: RavenCurow

Re: Civilians V2 Useful civilians mod

Postby Professor » 29 Aug 2016, 00:58

Sounds quite nice. I think the mod vault is broke maybe I'm wrong.
Professor
Crusader
 
Posts: 46
Joined: 10 Aug 2016, 01:14
Has liked: 50 times
Been liked: 7 times
FAF User Name: ProfessorJ69

Re: Civilians V2 Useful civilians mod

Postby RavenCurow » 29 Aug 2016, 01:01

Ah okay. Then I will upload it to my dropbox and post a link from there. Unfortunately it won't be till the morning EST as Im working tonight. I'll get it uploaded as soon as I can though.
RavenCurow
Avatar-of-War
 
Posts: 98
Joined: 30 Oct 2014, 01:17
Has liked: 1 time
Been liked: 14 times
FAF User Name: RavenCurow

Re: Civilians V2 Useful civilians mod

Postby RavenCurow » 30 Aug 2016, 01:23

Download link has been posted. I hope you enjoy the mod. If anyone has any issues please done hesitate to to report them Ill try to fix any bugs that show up. Also if you have any suggestions for changes or things you would like to see feel free to offer suggestions.
RavenCurow
Avatar-of-War
 
Posts: 98
Joined: 30 Oct 2014, 01:17
Has liked: 1 time
Been liked: 14 times
FAF User Name: RavenCurow

Re: Civilians V2 Useful civilians mod

Postby Uveso » 30 Aug 2016, 04:10

Hello RavenCurow, i know you will hate me now :shock:
Found some bugs :mrgreen:

Code: Select all
Unit uac1901c (Experimental Power Generator) Categories.TECH3 dont match TechLevel (RULEUTL_Advanced)
Unit xec1501c (Experimental Command Suite) Categories.TECH1 dont match TechLevel (RULEUTL_experimental)
Unit uac1501c has no Unitname! Description=(Aeon Manufacturing Center)
Unit xac1501c (Experimental Command Suite) Categories.TECH1 dont match TechLevel (RULEUTL_experimental)
Unit urc1401c (Experimental Mass Storage & Fabricator) Categories.TECH3 dont match TechLevel (RULEUTL_Advanced)
Unit xsc1401c (HydroCarbon Perimeter Monitoring System) Categories.TECH1 dont match TechLevel (RULEUTL_Advanced)
Unit xsc1401c Name: Uyal Ha-Esel (HydroCarbon Perimeter Monitoring System) has a wrong BackgroundIcon: "land"
Unit uec1401c (Experimental Mass Storage & Fabricator) Categories.TECH3 dont match TechLevel (RULEUTL_Advanced)
Unit xec1401c (HydroCarbon Perimeter Monitoring System) Categories.TECH1 dont match TechLevel (RULEUTL_Advanced)
Unit xec1401c Name: UEF High Command (HydroCarbon Perimeter Monitoring System) has a wrong BackgroundIcon: "land"
Unit uec1501c (UEF Manufacturing Facility) Categories.TECH2 dont match TechLevel (RULEUTL_Basic)
Unit urc1501c has no Unitname! Description=(Cybran Manufacturing Center)
Unit xrc2201c (Experimental Omni Disrupting Facility) Categories.EXPERIMENTAL dont match TechLevel (RULEUTL_Advanced)
Unit uac1101c has no Unitname! Description=(Aeon Residential Structure)
Unit xsc2201c (Regen Field Generator) Categories.TECH1 dont match TechLevel (RULEUTL_Advanced)
Unit xsc2201c Name: Rift Support Structure (Regen Field Generator) has a wrong BackgroundIcon: "land"
Unit uac1401c has no Unitname! Description=(Experimental Mass Storage & Fabricator)
Unit xac2101c (Experimental Shield Generator) Categories.TECH1 dont match TechLevel (RULEUTL_Secret)
Unit xac2101c Name: Aeon Palace (Experimental Shield Generator) has a wrong BackgroundIcon: "land"
Unit urc1901c has no Unitname! Description=(Cybran QAI Secondary Mainframe)

Code: Select all
no Unit exist for Icon "xsb1208" (Unit found in XtremeWars)
no Unit exist for Icon "uab1107" (Unit found in TotalMayhem)
no Unit exist for Icon "urb1208" (Unit found in XtremeWars)
no Unit exist for Icon "urb1207" (Unit found in XtremeWars)
no Unit exist for Icon "urb4401" (Unit found in ExperimentalWars1)
no Unit exist for Icon "xsb1108" (Unit found in XtremeWars)
no Unit exist for Icon "urb1107" (Unit found in TotalMayhem))
no Unit exist for Icon "xsb1207" (Unit found in XtremeWars)
no Unit exist for Icon "xsb1107" (Unit found in XtremeWars)
no Unit exist for Icon "ueb2201" (Unit found in XtremeWars)
no Unit exist for Icon "urb1108" (Unit found in XtremeWars)
no Unit exist for Icon "uab2201" (Unit found in XtremeWars)
no Unit exist for Icon "urb2201" (Unit found in XtremeWars)
Unit xac1401c is missing a unit Icon!
Unit xrc2201c is missing a unit Icon!


No localisation found:<LOC ability_regeneration>Regeneration Field
No localisation found:Mass Reducer
No localisation found:<LOC ability_cloakfield>Cloak Field

Code: Select all
- Unit:(urc1401c) (Experimental Mass Storage & Fabricator) has no Description and no Display.Abilities. Unit tooltip not available then!
- Unit:(xsc1401c) (HydroCarbon Perimeter Monitoring System) has no Description and no Display.Abilities. Unit tooltip not available then!
- Unit:(uec1401c) (Experimental Mass Storage & Fabricator) has no Description and no Display.Abilities. Unit tooltip not available then!
- Unit:(xrc2201c) (Experimental Omni Disrupting Facility) has no Description and no Display.Abilities. Unit tooltip not available then!

- Unit xec1501c Name: Samantha Clarke Statue (Experimental Command Suite) Ability mismatch!
   Obsolete Ability: "ability_notcap"
   Missing Ability: "ability_stealthfield"

- Unit xac1501c Name: Finther (Experimental Command Suite) Ability mismatch!
   Obsolete Ability: "ability_notcap"
   Missing Ability: "ability_stealthfield"


- Unit uac1201c Name: Aeon Science Lab (Experimental Power Generator) Ability mismatch!
   Missing Ability: "ability_amphibious"
   Missing Ability: "ability_aquatic"

- Unit xsc1401c Name: Uyal Ha-Esel (HydroCarbon Perimeter Monitoring System) Ability mismatch!
   Missing Ability: "ability_amphibious"

- Unit xec1401c Name: UEF High Command (HydroCarbon Perimeter Monitoring System) Ability mismatch!
   Missing Ability: "ability_amphibious"

- Unit xrc2201c Name: QAI Mainframe (Experimental Omni Disrupting Facility) Ability mismatch!
   Missing Ability: "ability_stealthfield"

- Unit xsc2201c Name: Rift Support Structure (Regen Field Generator) Ability mismatch!
   Missing Ability: "ability_aquatic"
   Unknown Ability: "<LOC ability_regeneration>Regeneration Field"

- Unit xac2101c Name: Aeon Palace (Experimental Shield Generator) Ability mismatch!
   Missing Ability: "ability_aquatic"
   
- Unit:(xsc1501c) - LOD[-1] AnimationDeath-File /units/xsc1501c/xsc1501c_ADeath1.sca is missing on disk
   found file ("/mods/civiliansv2/units/xsc1501c/xsc1501c_ADeath1.sca") on disk.
   please change AnimationDeathName from ("/units/xsc1501c/") to ("/mods/civiliansv2/units/xsc1501c/xsc1501c_ADeath1.sca") in file [xsc1501c_unit.bp]

- Unit:(xsc1301c) - LOD[-1] AnimationDeath-File /units/xsc1301c/xsc1301c_Adeath1.sca is missing on disk
   found file ("/mods/civiliansv2/units/xsc1301c/xsc1301c_Adeath1.sca") on disk.
   please change AnimationDeathName from ("/units/xsc1301c/") to ("/mods/civiliansv2/units/xsc1301c/xsc1301c_Adeath1.sca") in file [xsc1301c_unit.bp]

No AI Support found!

Yes it's auto-created :mrgreen:

[Edit]
Skirtsize is to small on unit xsc2201c

And some warnings inside the log:
Code: Select all
WARNING: Error running OnFire script in CScriptObject at 1f98d850: attempt to get as UserData a nil value
         stack traceback:
            [C]: ?
            ...\mods\civiliansv2\units\xrc2201c\xrc2201c_script.lua(93): in function <...\mods\civiliansv2\units\xrc2201c\xrc2201c_script.lua:20>
            [C]: in function `FireWeapon'
            ...\mods\civiliansv2\units\xrc2201c\xrc2201c_script.lua(164): in function <...\mods\civiliansv2\units\xrc2201c\xrc2201c_script.lua:159>

WARNING: Error running OnStopBeingBuilt script in Entity uac1901c at 196e5f08: Invalid bone name "Orb".
         stack traceback:
            [C]: in function `CreateRotator'
            ...\mods\civiliansv2\units\uac1901c\uac1901c_script.lua(25): in function <...\mods\civiliansv2\units\uac1901c\uac1901c_script.lua:15>

WARNING: Error running OnAdjacentTo script in Entity urc1401c at 222ba808: ...:\programdata\faforever\repo\fa\lua\defaultunits.lua(491): access to nonexistent global variable "T3MassStorageFabricationAdjacencyBuffs"

WARNING: Error running OnStopBeingBuilt script in Entity xac1401c at 21d97408: ...\mods\civiliansv2\units\xac1401c\xac1401c_script.lua(114): attempt to perform arithmetic on field `ExpandingVisionDisableCount' (a nil value)
            ...\mods\civiliansv2\units\xac1401c\xac1401c_script.lua(59): in function <...\mods\civiliansv2\units\xac1401c\xac1401c_script.lua:58>

WARNING: ...\mods\civiliansv2\units\xsc1301c\xsc1301c_script.lua(14): access to nonexistent global variable "SRadarJammerUnit"

WARNING: Error importing /mods/civiliansv2/units/xsc1301c/xsc1301c_script.lua:
         Error importing '/mods/civiliansv2/units/xsc1301c/xsc1301c_script.lua'
         stack traceback:
            [C]: in function `error'
            ...1.5.3603\gamedata\mohodata.scd\lua\system\import.lua(52): in function `import'
INFO: Problems loading module '/mods/civiliansv2/units/xsc1301c/xsc1301c_script.lua'.  Falling back to 'Unit' in '/lua/sim/unit.lua'.
Last edited by Uveso on 30 Aug 2016, 04:44, edited 1 time in total.
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Civilians V2 Useful civilians mod

Postby RavenCurow » 30 Aug 2016, 04:43

Lol figures. See I had ripped my mod out of a compilation mod I had made for myself to cut down on the number of individual mods I would have to activate. It looks like some of my icons got misplaced. I didn't realize so many of my unit rules were mismatched ugh. The AI support is intentional as Im not sure if they would use the buildings as intended. Some of my buildings do things like offering a high adjacency bonus to reduce the mass consumption of factories, Im worried that if they build them or the energy variant they would use them instead of regular pgens for power or they wouldn't build them at all. Not sure how I could get them to use them right. Well back to the drawing board T.T Ill try and fix things asap. I think most of these are easy fixes. The rule problems stem from shuffling the buildings around different tech levels for balance testing. I think the adjacency problem comes from forgetting to change the adjacency name after updating my file to the faf model. Script errors my be a bit more annoying.
RavenCurow
Avatar-of-War
 
Posts: 98
Joined: 30 Oct 2014, 01:17
Has liked: 1 time
Been liked: 14 times
FAF User Name: RavenCurow

Re: Civilians V2 Useful civilians mod

Postby Uveso » 30 Aug 2016, 05:01

Well i am programming a unitdebugger that checks unitblueprints. And i used your mod now to make some improvements on my debugger. :)

AI support is verry simple.

Create a directory inside you Modfolder and name it "lua"
Now create a directory named "customunits" inside the lua folder.
And create a empty text file and name it "ExpMassBuilding.lua"

Copy this into "ExpMassBuilding.lua" lua:

Code: Select all
    UnitList = {
       MassStorage = {
          UEF = {'UAC1401c', 50}, -- Experimental Mass Storage & Fabricator
       },
    }

"50" after the UnitId means, if the AI want's to build a MassStorage it will be to 50% your unit UAC1401c.

Thats all, now the AI can build it.
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Civilians V2 Useful civilians mod

Postby RavenCurow » 30 Aug 2016, 05:06

I know, but the building Im worried about is UEC1501c Uef Manufacturing Facility and it's factional variants. See it's adjacency is coded to give mex adjacency bonus; however, it doesn't actually produce any mass itself. It's only purpose us to reduce mass cost by providing a high adjacency bonus. I'm afraid the computer would see it as a regular mass fabricator and not use it right.
RavenCurow
Avatar-of-War
 
Posts: 98
Joined: 30 Oct 2014, 01:17
Has liked: 1 time
Been liked: 14 times
FAF User Name: RavenCurow

Re: Civilians V2 Useful civilians mod

Postby Uveso » 30 Aug 2016, 05:19

Sure, the computer is thinking, he is building a Tech1 Mass Storage.
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Civilians V2 Useful civilians mod

Postby RavenCurow » 30 Aug 2016, 05:30

Well for this particular building it would think it's building a mass fab. For the hybrid it would think it's building one or the other. Hmm. Well for the hybrid building would it be possible to code it in separate brackets as a mass storage as well as a fabricator
This way if it needs storage it will build it 50% of the time or if it needs a fabricator it would build it 50% of the time.
RavenCurow
Avatar-of-War
 
Posts: 98
Joined: 30 Oct 2014, 01:17
Has liked: 1 time
Been liked: 14 times
FAF User Name: RavenCurow

Next

Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest