Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Tue Mar 19, 2024 9:46 am
All times are UTC + 0
Near perfect sub-factions
Moderators: Global Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [19 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 28, 2013 4:15 am    Post subject:  Near perfect sub-factions Reply with quote  Mark this post and the followings unread

Got the final things ironed out from a method that allows you to have sub-factions in TS, without making the player take all sorts of weird actions. The only input required from the player is doing the sub-faction selection in the sidebar. Here is an animation showing how it works.




You are required to do a few things in order for this logic to work:

1. Can't have starting units, other than the MCV.
2. Bases setting needs to be on.


Let's start in rules.ini with a few tweaks:

Code:

[General]
TeamDelays=800,800,800     ; So AI builds the sub-faction HQ as the first unit
AIHateDelays=900,1100,2000 ; So AI chooses enemy faster

[CombatDamage]
MinDamage=0                ; Helps get rid of some odd EVA comments

[MultiplayerDefaults]
Bases=yes                  ; Needs to be yes for sub-factions to work
UnitCount=2                ; Needs to be exactly 2 for sub-factions to work

[Difficult]
BuildSlowdown=no           ; So AI chooses sub-faction quickly

[Normal]
BuildSlowdown=no           ; So AI chooses sub-faction quickly

[Easy]
BuildSlowdown=no           ; So AI chooses sub-faction quickly


Now go through all your vehicle and infantry units, and give them AllowedToStartInMultiplayer=no. By default it's set to Yes, so you need to give this line for every unit.

Now let's add the required vehicles, buildings, animations and warheads into the lists:

Code:

[VehicleTypes]
...
xx=HELPER  ; Little extra vehicle required for logic to work
xx=GDISUBF ; GDI sub-faction factory (vehicle)
xx=NODSUBF ; Nod sub-faction factory (vehicle)
xx=GDISUB1 ; GDI sub-faction vehicle 1
xx=GDISUB2 ; GDI sub-faction vehicle 2
xx=GDISUB3 ; GDI sub-faction vehicle 3


[BuildingTypes]
...
xxx=GASUBF ; GDI sub-faction factory (building)
xxx=NASUBF ; Nod sub-faction factory (building)
xxx=GASUB1 ; GDI sub-faction HQ 1
xxx=GASUB2 ; GDI sub-faction HQ 2
xxx=GASUB3 ; GDI sub-faction HQ 3


[Animations]
...
xxx=SUBBEACONMK ; Sub-faction factory buildup anim
xxx=INVISANIM   ; Invisible anim
xxx=SUICIDE1A   ; Used to suicide the Helper vehicle, part 1
xxx=SUICIDE1B   ; Used to suicide the Helper vehicle, part 2

xxx=SPAWNER1    ; Debris anims to suicide the sub-faction factories
xxx=SPAWNER2
xxx=DEBRIS1
xxx=DEBRIS2


[Warheads]
...
xx=DeployWeaponWH ; Used by all the sub-faction logic weapons
xx=DoNothingWH    ; Used by helper vehicle (so it won't attack anything else but concrete)
xx=KillerDebrisWH ; Used by the suicide debris



Now let's just define all the things we put in the lists above. I've put comments for some of the keys of interest. Vehicles first:

Code:

[HELPER]
Name=Happy little helper
Image=INVISVEH
Owner=Civilian
Prerequisite=CABHUT
Category=AFV
Primary=ForceDeploy
Secondary=DoNothing
Strength=10
Armor=concrete
TechLevel=1
AllowedToStartInMultiplayer=no
CrateGoodie=no
Sight=5
Speed=16
Cost=0
Points=0
ROT=30
Crusher=no
Crewed=no
MaxDebris=0
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
ThreatPosed=0
Weight=1.0

; GDI Subfaction Factory Vehicle
[GDISUBF]
Name=-
Owner=GDI
Image=INVISVEH
Prerequisite=CABHUT
Category=AFV
Primary=DeployWeapon
DeployToFire=yes
GuardRange=255
Selectable=no
Strength=1000
Armor=concrete
TechLevel=1
AllowedToStartInMultiplayer=yes ; You start with this and MCV
CrateGoodie=no
Sight=5
Speed=16
Cost=5000 ; Very specific cost to make MCV and this appear at start
Points=0
ROT=30
Crusher=no
Crewed=no
MaxDebris=0
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
DeploysInto=GASUBF
ThreatPosed=0
Weight=1.0

; Nod Subfaction Factory Vehicle
[NODSUBF]
Name=-
Owner=Nod
Image=INVISVEH
Prerequisite=CABHUT
Category=AFV
Primary=DeployWeapon
DeployToFire=yes
GuardRange=255
Selectable=no
Strength=1000
Armor=concrete
TechLevel=1
AllowedToStartInMultiplayer=yes ; You start with this and MCV
CrateGoodie=no
Sight=5
Speed=16
Cost=5000 ; Very specific cost to make MCV and this appear at start
Points=0
ROT=30
Crusher=no
Crewed=no
MaxDebris=0
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
DeploysInto=NASUBF
ThreatPosed=0
Weight=1.0

; GDI Subfaction Vehicle 1
[GDISUB1]
Name=Tank Faction
Owner=GDI
Image=GDISUB1
Prerequisite=GASUBF
Category=AFV
Primary=DeployWeapon
DeployToFire=yes
GuardRange=255
Strength=9999
Armor=concrete
TechLevel=1
AllowedToStartInMultiplayer=no
CrateGoodie=no
Sight=5
Speed=16
Cost=200 ; So player can have some time to cancel their choice
Points=0
ROT=30
Crusher=no
Crewed=no
MaxDebris=0
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
DeploysInto=GASUB1
ThreatPosed=0
Weight=1.0
BuildLimit=-1 ; So you can't order multiple copies of them in the sidebar

; GDI Subfaction Vehicle 2
[GDISUB2]
Name=Air Faction
Owner=GDI
Image=GDISUB2
Prerequisite=GASUBF
Category=AFV
Primary=DeployWeapon
DeployToFire=yes
GuardRange=255
Strength=9999
Armor=concrete
TechLevel=1
AllowedToStartInMultiplayer=no
CrateGoodie=no
Sight=5
Speed=16
Cost=200 ; So player can have some time to cancel their choice
Points=0
ROT=30
Crusher=no
Crewed=no
MaxDebris=0
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
DeploysInto=GASUB2
ThreatPosed=0
Weight=1.0
BuildLimit=-1 ; So you can't order multiple copies of them in the sidebar

; GDI Subfaction Vehicle 3
[GDISUB3]
Name=Special Faction
Owner=GDI
Image=GDISUB3
Prerequisite=GASUBF
Category=AFV
Primary=DeployWeapon
DeployToFire=yes
GuardRange=255
Strength=9999
Armor=concrete
TechLevel=1
AllowedToStartInMultiplayer=no
CrateGoodie=no
Sight=5
Speed=16
Cost=200 ; So player can have some time to cancel their choice
Points=0
ROT=30
Crusher=no
Crewed=no
MaxDebris=0
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
DeploysInto=GASUB3
ThreatPosed=0
Weight=1.0
BuildLimit=-1 ; So you can't order multiple copies of them in the sidebar



Next up, buildings:

Code:

; GDI Subfaction Factory
[GASUBF]
Name=Choose your sub-faction
Owner=GDI
Image=SUBBEACON
Factory=UnitType
WeaponsFactory=no ; Want insta-spawning of vehicles built
Prerequisite=CABHUT
Strength=10       ; So it gets killed quickly
Armor=light       ; Specific armor type required for suiciding
Selectable=no
TechLevel=1
Sight=6
Adjacent=2
Cost=0
Points=0
Power=0
TickTank=yes      ; For correct deploying
BaseNormal=no
Capturable=no
Repairable=no
TogglePower=no
Unsellable=yes
Crewed=no
Bib=yes
Explosion=
MaxDebris=0
ThreatPosed=0
AIBuildThis=no
VoiceDie=BOOP     ; Could use some fitting sound here

; Nod Subfaction Factory
[NASUBF]
Name=Choose your sub-faction
Owner=Nod
Image=SUBBEACON
Factory=UnitType
WeaponsFactory=no
Prerequisite=CABHUT
Strength=10
Armor=light
Selectable=no
TechLevel=1
Sight=6
Adjacent=2
Cost=0
Points=0
Power=0
TickTank=yes
BaseNormal=no
Capturable=no
Repairable=no
TogglePower=no
Unsellable=yes
Crewed=no
Bib=yes
Explosion=
MaxDebris=0
ThreatPosed=0
AIBuildThis=no
VoiceDie=BOOP

; GDI Subfaction HQ 1
[GASUB1]
Name=-
Nominal=yes ; So it won't display "Enemy structure" to enemies
Owner=GDI
Image=INVISBUILD
Prerequisite=CABHUT
Strength=10000
Immune=yes
LegalTarget=no
Selectable=no
Insignificant=yes
Armor=heavy
TechLevel=-1
Sight=3
Adjacent=2
Cost=0
Points=0
Power=0
TickTank=yes
BaseNormal=no
Capturable=no
Repairable=no
TogglePower=no
Unsellable=yes
Crewed=no
Explosion=
MaxDebris=0
ThreatPosed=0
AIBuildThis=no
DeploySound= ; Add some speech here, e.g. "Tank Faction selected!"

; GDI Subfaction HQ 2
[GASUB2]
Name=-
Nominal=yes
Owner=GDI
Image=INVISBUILD
Prerequisite=CABHUT
Strength=10000
Immune=yes
LegalTarget=no
Selectable=no
Insignificant=yes
Armor=heavy
TechLevel=-1
Sight=3
Adjacent=2
Cost=0
Points=0
Power=0
TickTank=yes
BaseNormal=no
Capturable=no
Repairable=no
TogglePower=no
Unsellable=yes
Crewed=no
Explosion=
MaxDebris=0
ThreatPosed=0
AIBuildThis=no
DeploySound=

; GDI Subfaction HQ 3
[GASUB3]
Name=-
Nominal=yes
Owner=GDI
Image=INVISBUILD
Prerequisite=CABHUT
Strength=10000
Immune=yes
LegalTarget=no
Selectable=no
Insignificant=yes
Armor=heavy
TechLevel=-1
Sight=3
Adjacent=2
Cost=0
Points=0
Power=0
TickTank=yes
BaseNormal=no
Capturable=no
Repairable=no
TogglePower=no
Unsellable=yes
Crewed=no
Explosion=
MaxDebris=0
ThreatPosed=0
AIBuildThis=no
DeploySound=



Some weapons and warheads:

Code:

[ForceDeploy]
Damage=1
ROF=1
Range=255
Projectile=Invisible
Speed=100
Warhead=DeployWeaponWH
Anim=SUICIDE1A ; Start a timed suicide anim

[DoNothing]
Damage=1
ROF=50
Range=300
MinimumRange=290
Projectile=Invisible
Speed=100
Warhead=DoNothingWH
Charges=yes

[DeployWeapon]
Damage=1
ROF=5
Range=255
Projectile=Invisible
Speed=100
Warhead=DeployWeaponWH


[DeployWeaponWH]
Spread=0
Verses=0%,0%,0%,0%,1% ; Target only Armor=concrete (helper vehicle, sub-faction related vehicles)
InfDeath=0
ProneDamage=0%
;Veinhole=yes         ; This sometimes made AI MCV go mad, so disabled it.

[DoNothingWH]
Spread=0
Verses=100%,100%,100%,100%,0% ; Target everything else except Armor=concrete
InfDeath=0
ProneDamage=100%

[KillerDebrisWH]
Spread=0
Verses=0%,0%,100%,0%,0% ; Damage only Armor=light (subfaction factory)
InfDeath=0
ProneDamage=0%




That's it for rules.ini. Onto art.ini. Some vehicle artwork:

Code:

[INVISVEH]
Voxel=no
PrimaryFireFLH=0,0,0

[GDISUB1]
Cameo=GDISUB1ICON
Voxel=no
PrimaryFireFLH=0,0,0

[GDISUB2]
Cameo=GDISUB2ICON
Voxel=no
PrimaryFireFLH=0,0,0

[GDISUB3]
Cameo=GDISUB3ICON
Voxel=no
PrimaryFireFLH=0,0,0



Building artwork:

Code:

[INVISBUILD]
Foundation=0x0
Buildup=INVISANIM
DemandLoadBuildup=true
FreeBuildup=true
ActiveAnim=SPAWNER1

[SUBBEACON]
Foundation=1x1
Height=2
Buildup=SUBBEACONMK
DemandLoadBuildup=true
FreeBuildup=true



And finally, some animations:

Code:

[INVISANIM]
Start=0
End=12

[SUICIDE1A]
Image=INVISO
Surface=yes
Start=0
End=1000
Next=SUICIDE1B

[SUICIDE1B]
Image=INVISO
Surface=yes
Damage=9999
DamageRadius=0
Start=0
End=5

; Debris spawner 1
[SPAWNER1]
Image=INVISANIM
TrailerAnim=DEBRIS1
TrailerSeperation=1
Rate=200
Start=0
End=8

; Debris 1
[DEBRIS1]
Image=NULL
ExpireAnim=SPAWNER2
Damage=9999
DamageRadius=9999
Warhead=KillerDebrisWH
Elasticity=0.0
MaxXYVel=22.0
MinZVel=10.0
LoopStart=0
LoopEnd=8
LoopCount=-1
Rate=500
Bouncer=yes

; Debris spawner 2
[SPAWNER2]
Image=INVISANIM
TrailerAnim=DEBRIS2
TrailerSeperation=1
Rate=200
Start=0
End=8

; Debris 2
[DEBRIS2]
Image=NULL
Damage=9999
DamageRadius=9999
Warhead=KillerDebrisWH
Elasticity=0.0
MaxXYVel=16.0
MinZVel=8.0
LoopStart=0
LoopEnd=8
LoopCount=-1
Rate=500
Bouncer=yes



That should be it. Now you do need to do one more thing before testing it. You need to place exactly one Helper vehicle to all of your maps. Place it near the center of the map. This Helper vehicle is absolutely required for the logic to work. You don't need to create any teams or scripts for it to work, simply placing one neutral owned Helper vehicle is enough.

If you have any questions of the logic, just ask. I've added descriptions of all the things at the start of the tutorial (where we added all the stuff into the lists in rules.ini). I've also included a RAR that contains all the necessary files to quick test this logic in TS / FS. Just extract it to your (unmodified) TS directory. Check the readme.txt for further details.



subfactions.gif
 Description:
 Filesize:  479.21 KB
 Viewed:  11688 Time(s)

subfactions.gif



subfaction_files.rar
 Description:
All the files required for a quick test of this logic in the original TS.

Download
 Filename:  subfaction_files.rar
 Filesize:  256.91 KB
 Downloaded:  163 Time(s)



Key Words: #Tutorials #Modding #TiberianSun #Firestorm #Rules.INI #Art.INI #AI.INI 

_________________

Last edited by SuperJoe on Wed Jan 30, 2013 4:40 pm; edited 4 times in total

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 28, 2013 4:56 am    Post subject: Reply with quote  Mark this post and the followings unread

I'll post the ai.ini stuff required to make AI use this logic later. I've tested a very similar thing with the AI before, and I'm pretty sure this logic shouldn't cause the AI any problems. It should randomly choose one of the 3 factions. After that we can use the sub-faction HQ as the trigger condition for any sub-faction specific teams. Or we can use the sub-faction HQ as a prerequisite for some of the structures, and since the AI does follow prerequisites with structures, not having a sub-faction HQ will stop him from getting access to certain things. So basically:

Sub-faction HQ 1 is required for advanced helipad. Since AI doesn't have HQ 1, he can't build advanced helipad, and thus we can use advanced helipad as the trigger condition in ai.ini.

_________________

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 28, 2013 7:18 am    Post subject: Reply with quote  Mark this post and the followings unread

Confirmed the AI works with this logic without any special hacks. It will randomly choose one of the factions. If you save before he makes the choice and load, he might make a different choice. So it is quite random. I couldn't get the sub-faction HQ to work as a building prerequisite (for the AI) for some reason. Dunno if it was due to the building being 0x0, or Insignificant=yes, or something else. I did try with 1x1 and it didn't help. Might need to look more into it. But the HQ does work as a trigger condition, so the AI can be made to fully utilize sub-factions. I've updated the subfaction_files.rar to include an edited ai.ini and a few more tweaks to rules.ini to make it work with the AI.


Anyway, here are quick instructions how to get it done. Start in rules.ini again:

Code:

[General]
UseMinDefenseRule=no ; So AI builds the sub-faction vehicle ASAP
AIHateDelays=1,1,1   ; So AI doesn't get mad at Neutral (due to the Helper vehicle)


If you don't disable MinDefenseRule, the AI will not build the sub-faction vehicle for quite a while, messing things up. Also noticed that the AI is hardcoded to build 1 extra harvester right away, even before the sub-faction vehicle. You could stop it by getting rid of the hardcoded harvester AI replacement logic (like I have in my mod). But overall the extra harvester building doesn't matter, right after that the AI will build one of the sub-faction vehicles.

Anyway, moving to ai.ini. Start with taskforces:

Code:

[TaskForces]
xxx=GDISUB1 ; GDI Tank Faction
xxx=GDISUB2 ; GDI Air Faction
xxx=GDISUB3 ; GDI Special Faction

xxx=GDITEST ; a "Special Faction only" test


[GDISUB1]
Name=GDI Tank Faction
0=1,GDISUB1
Group=-1

[GDISUB2]
Name=GDI Air Faction
0=1,GDISUB2
Group=-1

[GDISUB3]
Name=GDI Special Faction
0=1,GDISUB3
Group=-1

[GDITEST]
Name=GDI TEST
0=3,LPST
Group=-1



A script:

Code:

[ScriptTypes]
xxx=SUBDEPLOY


[SUBDEPLOY]
Name=Subfaction Deploy
0=9,0      ; Deploy yourself



Teamtypes:

Code:

[TeamTypes]
xxxx=TGDISUB1
xxxx=TGDISUB2
xxxx=TGDISUB3

xxxx=TGDITEST


[TGDISUB1]
Name=GDI Tank Faction
House=GDI
Priority=100
Max=1
Script=SUBDEPLOY
TaskForce=GDISUB1
Aggressive=yes
AvoidThreats=no
Annoyance=no
Suicide=no
Whiner=no
Group=-1
Reinforce=no
AreTeamMembersRecruitable=no
Recruiter=no
LooseRecruit=no
IsBaseDefense=no
GuardSlower=no
OnlyTargetHouseEnemy=no
Autocreate=no
Prebuild=no
Loadable=no
OnTransOnly=no
TransportsReturnOnUnload=no
VeteranLevel=1
TechLevel=0
IonImmune=no
Droppod=no
Full=no

[TGDISUB2]
Name=GDI Air Faction
House=GDI
Priority=100
Max=1
Script=SUBDEPLOY
TaskForce=GDISUB2
Aggressive=yes
AvoidThreats=no
Annoyance=no
Suicide=no
Whiner=no
Group=-1
Reinforce=no
AreTeamMembersRecruitable=no
Recruiter=no
LooseRecruit=no
IsBaseDefense=no
GuardSlower=no
OnlyTargetHouseEnemy=no
Autocreate=no
Prebuild=no
Loadable=no
OnTransOnly=no
TransportsReturnOnUnload=no
VeteranLevel=1
TechLevel=0
IonImmune=no
Droppod=no
Full=no

[TGDISUB3]
Name=GDI Special Faction
House=GDI
Priority=100
Max=1
Script=SUBDEPLOY
TaskForce=GDISUB3
Aggressive=yes
AvoidThreats=no
Annoyance=no
Suicide=no
Whiner=no
Group=-1
Reinforce=no
AreTeamMembersRecruitable=no
Recruiter=no
LooseRecruit=no
IsBaseDefense=no
GuardSlower=no
OnlyTargetHouseEnemy=no
Autocreate=no
Prebuild=no
Loadable=no
OnTransOnly=no
TransportsReturnOnUnload=no
VeteranLevel=1
TechLevel=0
IonImmune=no
Droppod=no
Full=no

[TGDITEST]
Name=GDI TEST
House=GDI
Priority=100
Max=1
Script=SUBDEPLOY
TaskForce=GDITEST
Aggressive=yes
AvoidThreats=no
Annoyance=no
Suicide=no
Whiner=no
Group=-1
Reinforce=no
AreTeamMembersRecruitable=no
Recruiter=no
LooseRecruit=no
IsBaseDefense=no
GuardSlower=no
OnlyTargetHouseEnemy=no
Autocreate=no
Prebuild=no
Loadable=no
OnTransOnly=no
TransportsReturnOnUnload=no
VeteranLevel=1
TechLevel=0
IonImmune=no
Droppod=no
Full=no



Triggers:

Code:

[AITriggerTypes]

00001000-G=GDI Tank Faction,TGDISUB1,<all>,1,1,GASUBF,0100000003000000000000000000000000000000000000000000000000000000,5000.000000,5000.000000,5000.000000,1,0,1,0,<none>,1,1,1

00001001-G=GDI Air Faction,TGDISUB2,<all>,1,1,GASUBF,0100000003000000000000000000000000000000000000000000000000000000,5000.000000,5000.000000,5000.000000,1,0,1,0,<none>,1,1,1

00001002-G=GDI Special Faction,TGDISUB3,<all>,1,1,GASUBF,0100000003000000000000000000000000000000000000000000000000000000,5000.000000,5000.000000,5000.000000,1,0,1,0,<none>,1,1,1


00009999-G=GDI TEST,TGDITEST,<all>,1,1,GASUB3,0100000003000000000000000000000000000000000000000000000000000000,5000.000000,5000.000000,5000.000000,1,0,1,0,<none>,1,1,1



If you see the AI build and deploy 3 sensor arrays, it means he chose the special sub-faction. I didn't put any other sub-faction specific things in here so this tutorial wouldn't get overly long and messy.


Btw something wrong with the forums, when I tried to update or remove the attached file my entire post disappeared. Had to go back and copy paste it into the message field before I could update the file.

_________________

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jan 28, 2013 7:56 am    Post subject: Reply with quote  Mark this post and the followings unread

The code has a few suboptimal settings:
SUICIDE1A is using INVISO which has only 1 frame, yet wanting to play 1000 frames. Better use a lot less frames and the Rate key to exactly time the anim. (e.g. Start=0 End=1 Rate=1 for exactly 1 minute delay)

INVISBUILD can directly get the DEBRIS1 assigned on the activeanim. Since the debris is supposed to be spawned only once, there is no need to go over the intermediate step anim SPAWNER1. SPAWNER1 would also play 8 debris, which is quite redundant since 1 is already enough.

SPAWNER2 is quite useless imo. Why should DEBRIS1 spawn that, when debris1 destroyed already the dummy factory?
Right now you spawn something around 64 debris while 1 would be already enough.
I guess you did that since the faction vehicle is spawned a few cells away from the dummy factory and this way wanted to make sure the factory is really destroyed when the vehicle deploys.

Why don't you use the dooranim or productionanim to kill the faction warfactory?

What if you order all 3 factions to be build? It looks like the second could be ready before the warfactory destroys itself.

What if the helper isn't shooting on one of the dummy warfactories? This side would then don't have any subfaction.

For what is the DoNothing weapon on the HELPER? I guess you want to avoid that it keeps shooting on armor=concrete stuff.
But wouldn't it be better to give the HELPER a limited strength and do a suicide after a certain time? A building that constantly tries to attack something would be surely a (slight) cause of lags.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 28, 2013 8:17 am    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
SUICIDE1A is using INVISO which has only 1 frame, yet wanting to play 1000 frames. Better use a lot less frames and the Rate key to exactly time the anim. (e.g. Start=0 End=1 Rate=1 for exactly 1 minute delay)


This could probably be optimized like you said, I just put together something quickly to get it done.

Lin Kuei Ominae wrote:

I guess you did that since the faction vehicle is spawned a few cells away from the dummy factory and this way wanted to make sure the factory is really destroyed when the vehicle deploys.


Yes, at first I was using less debris and sometimes the warfactory didn't die. So I just made damn sure it does. Without SPAWNER2 I couldn't get the warfactory to die quickly enough. Now the number of debris spawned grows quickly since every debris that lands spawns more. At this point of the match I doubt this slowdown matters, and it only happens once.

Lin Kuei Ominae wrote:

Why don't you use the dooranim or productionanim to kill the faction warfactory?


I tried but both of those anims seem to require WeaponsFactory=yes set on the warfactory. WeaponsFactory=yes and 1x1 foundation together lead to a crash if you build something. I tried alot of the other special keys too, like ConstructionYard=yes, etc, but ultimately couldn't get anything to work. So I moved the self-destruction for the sub-faction HQ.

Lin Kuei Ominae wrote:

What if you order all 3 factions to be build? It looks like the second could be ready before the warfactory destroys itself.


There is not enough time to build another one. The debris will destroy it before that. Currently I've set the price of sub-factions to 200. Should it seem that's not enough, you could easily raise it to 300, or 400, and that wouldn't slow things too much. But in any of my tests I couldn't even get the 2nd one built half-way (with a a price of 200). Also the preview anim doesn't show, but I added BuildLimit=-1 to each of the sub-factions, it looks alot less messy now. And you can't order e.g. 10 tank factions anymore, only 1.

Lin Kuei Ominae wrote:

What if the helper isn't shooting on one of the dummy warfactories? This side would then don't have any subfaction.


It will shoot each of them in turns. It can only shoot at things with armor=concrete. When one of them deploys, it changes to the next concrete target.

One thing that might need to be better sorted out is what if the player doesn't choose a sub-faction for a long time. Then the Helper vehicle can die out from the suicide anim, before having the chance to make the sub-faction deploy. Though you can still select and deploy it manually, should that happen. Personally I think if someone doesn't make the selection in the first 1-2 minutes of the match they deserve what's coming to them  Laughing  Though maybe limited ammo on the Helper vehicle could work out better, than a timed suicide anim.

Also with this logic none of the factions early game buildings should use the concrete or light armor types (since the logic requires them for special uses). After the sub-faction choosing is done, the armor types can be used again.

_________________

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jan 28, 2013 10:08 am    Post subject: Reply with quote  Mark this post and the followings unread

I guess I would be the first one delaying the faction-choosing as much as possible to see if I can get a strategical advantage out of it. E.g. scouting the enemy faction and then using the best counter faction.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 28, 2013 1:25 pm    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
I guess I would be the first one delaying the faction-choosing as much as possible to see if I can get a strategical advantage out of it. E.g. scouting the enemy faction and then using the best counter faction.


You can tie the first or second building to the sub-faction HQs. In this tutorial I just didn't do that cause it would have required 3 separate power plants. In that case there would be very little you can do before choosing. Note that you can't stop the sub-faction factory from deploying, so the sub-faction selection becomes available even if you move out with the MCV.

If you really wanted to play it safe, give the Helper vehicle 5 mins to live, have the sub-faction HQs as prerequisites for the power plant, and don't use armor type concrete for early game stuff. If you were willing to dedicate armor type concrete for sub-factions only, then you could go without any time limits. But I wouldn't go as far as to waste an armor type for that.

_________________

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Jan 28, 2013 1:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

How about giving the conyard the dummy warfactory as FreeUnit?
Then you can keep using starting units and you can move your mcv around.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 28, 2013 2:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

Won't work cause the dummy warfactory needs to be a faction-specific unit. Or actually not completely sure it does... could it have Owner=GDI,Nod and then the sub-faction vehicles have only one of them as owner? Shared dummy warfactory, separate sub-faction vehicles. Would this give GDI only the GDI sub-factions in the sidebar, and Nod only the Nod ones?

As for giving it with a FreeUnit, I could see that leading to more problems. If you move your MCV to an area with cliffs and stuff nearby, the dummy warfactory might get stuck and not be able to deploy. If you wanted to make it obvious to the player he has to make a choice fast, you could have an active anim on the dummy warfactory, that displays a timer trickling down. If you don't choose the faction before timer runs out, the dummy warfactory self-destructs. You could still go on, but just lose all the sub-faction stuff.

EDIT: Could use the map trigger that displays a timer with a message for it too. Would probably look more professional than an active anim with a text and timer.


Btw got the AI to build the sub-faction vehicle as the very first unit by using the following:

Code:

[General]
TeamDelays=1000,1300,2200
AIHateDelays=800,1000,2000

[Easy]
BuildSlowdown=no

[Normal]
BuildSlowdown=no

[Difficult]
BuildSlowdown=no

_________________

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 28, 2013 3:53 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here's an updated version. There's a 2 minute timer now when the match starts. If you don't choose a sub-faction during these 2 minutes, the dummy warfactory self-destructs. The AI usually builds the sub-faction around 1 minute mark. It should be pretty obvious to players now what to do, even added a text trigger telling them to choose the sub-faction before the time runs out. It also works as a balancing factor, preventing you from delaying the choosing so you can see what the enemy chose.



subfaction_files_v2.rar
 Description:

Download
 Filename:  subfaction_files_v2.rar
 Filesize:  265.77 KB
 Downloaded:  134 Time(s)


_________________

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Mon Jan 28, 2013 7:00 pm    Post subject: Reply with quote  Mark this post and the followings unread

Just a little visual effect to go with it. In the test map I have a reveal trigger, so you can see which faction the AI chose from this animation  Laughing



subfactions2.gif
 Description:
 Filesize:  743.65 KB
 Viewed:  11522 Time(s)

subfactions2.gif



_________________

Back to top
View user's profile Send private message
Krow
Commander


Joined: 30 Jan 2010
Location: Malaysia

PostPosted: Mon Jan 28, 2013 7:20 pm    Post subject: Reply with quote  Mark this post and the followings unread

COOL!

_________________
Team Black wrote:
interesting seeing your voxel work. They're still better than Aro's!

Back to top
View user's profile Send private message
Aro
Alcohol Fueled


Joined: 10 Sep 2006

PostPosted: Mon Jan 28, 2013 7:22 pm    Post subject: Reply with quote  Mark this post and the followings unread

That's awesome.

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Wed Jan 30, 2013 4:46 pm    Post subject: Reply with quote  Mark this post and the followings unread

Here's the final version of this logic. Added sub-factions for Nod too and made both GDI and Nod AI select a random sub-faction. Also adjusted some of the art.ini codes to match the new 2 minute timer thing, and added the new visual effects. You can look up the codes from the files.



subfaction_files_v3.rar
 Description:

Download
 Filename:  subfaction_files_v3.rar
 Filesize:  361.11 KB
 Downloaded:  162 Time(s)


_________________

Back to top
View user's profile Send private message
Sir Shockwave
Cyborg Firebomber


Joined: 06 Sep 2011

PostPosted: Thu Jun 20, 2013 3:05 pm    Post subject: Reply with quote  Mark this post and the followings unread

I hate to be the one to Necrobump, but I'm getting a major issue after a few tests. It would seem for some reason after placing down the HELPER unit, after a successful test run of the map, the map will alter itself to erase the HELPER unit from it for no good reason!

EDIT - Scratch that, I got a different problem. You fix one, and ten more pop up -_-

Simply put, it's not obeying Build Prerequisites. If I set GDISUB1 as a Prerequisite, the game does not obey and simply makes the Unit buildable anyway.

Back to top
View user's profile Send private message
SuperJoe
Commander


Joined: 03 Sep 2009

PostPosted: Fri Jun 21, 2013 6:43 am    Post subject: Reply with quote  Mark this post and the followings unread

Sir Shockwave wrote:
I hate to be the one to Necrobump, but I'm getting a major issue after a few tests. It would seem for some reason after placing down the HELPER unit, after a successful test run of the map, the map will alter itself to erase the HELPER unit from it for no good reason!

EDIT - Scratch that, I got a different problem. You fix one, and ten more pop up -_-

Simply put, it's not obeying Build Prerequisites. If I set GDISUB1 as a Prerequisite, the game does not obey and simply makes the Unit buildable anyway.


I can't really see a reason why GDISUB1 would not work as a prerequisite. Are you sure the prerequisite isn't overridden somewhere (in the map itself, or in firestrm.ini)?

Btw the HELPER unit and all the hassle related to it can be avoided with the hacks provided by AlexB (used here). The GDISUBF / NODSUBF units at start can be made to automatically deploy for both humans and AI with these hacks:

Go to offset 0x1DEE36. You should see 6A 0A there. Change it to 6A 0E. This hack will make AI starting units (GDISUBF / NODSUBF) in a match go into "Hunt" mode instead of "Area Guard". Will make them automatically deploy.

To do the same for human starting units (GDISUBF / NODSUBF), go to offset 0x1DEE45. You should see 6A 05 there. Change it to 6A 0E.

I'll update the tutorial at some point with these hacks. It will make the logic a lot cleaner. With some work I think the sub-faction logic could be combined with the multi-MCV/con.yard logic.

_________________

Back to top
View user's profile Send private message
Sir Shockwave
Cyborg Firebomber


Joined: 06 Sep 2011

PostPosted: Fri Jun 21, 2013 9:12 am    Post subject: Reply with quote  Mark this post and the followings unread

SuperJoe wrote:
I can't really see a reason why GDISUB1 would not work as a prerequisite. Are you sure the prerequisite isn't overridden somewhere (in the map itself, or in firestrm.ini)?

Btw the HELPER unit and all the hassle related to it can be avoided with the hacks provided by AlexB (used here). The GDISUBF / NODSUBF units at start can be made to automatically deploy for both humans and AI with these hacks:

Go to offset 0x1DEE36. You should see 6A 0A there. Change it to 6A 0E. This hack will make AI starting units (GDISUBF / NODSUBF) in a match go into "Hunt" mode instead of "Area Guard". Will make them automatically deploy.

To do the same for human starting units (GDISUBF / NODSUBF), go to offset 0x1DEE45. You should see 6A 05 there. Change it to 6A 0E.

I'll update the tutorial at some point with these hacks. It will make the logic a lot cleaner. With some work I think the sub-faction logic could be combined with the multi-MCV/con.yard logic.


Bleh, now I'm just getting Internal Errors from the logic. I think it's probably safer to just ignore me - code has a habit of imploding in the most spectacular manner possible around me.

Back to top
View user's profile Send private message
Commander Robotnic Pingas
Civilian


Joined: 23 Mar 2013

PostPosted: Thu Jul 03, 2014 3:30 pm    Post subject: Reply with quote  Mark this post and the followings unread

Why is the AI not attacking? It takes a long time for the AI to attack and nothing I do fixes the problem. I test this in both my mod and the other. Is there any way to make the AI attack faster.

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Fri Jul 04, 2014 7:14 am    Post subject: Reply with quote  Mark this post and the followings unread

Original AI.ini was made specifically for GDI and Nod. If some buildings are not part of the new
factions/sub-factions, many AI trigger's precondition won't be met. AI scripts also use building
numbers from [BuildingTypes] which they may not find in the opponent's side. One has to change
ai.ini accordingly. Even making the base defense scripts to attack with exception to repair bot etc.
could be an option to make it aggressive as a quick fix.

Various factors like team size/cost, buildtime, support teams, credit availability, base defense
teams/count etc. can also make AI stagnant.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [19 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot 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


Powered by phpBB © phpBB Group

[ Time: 0.2060s ][ Queries: 15 (0.0123s) ][ Debug on ]