How get campaign difficulty ?

Everything about mods can be found here.

How get campaign difficulty ?

Postby Franck83 » 16 May 2018, 14:52

Hi,

Maybe someone knows how to retrieve Campaign difficulty (easy, medium, hard) in a mod ?
Alliance of Heroes Mod is out ! Try it ! It's in the Mod Vault !
Advanced Veterancy, insta and overtime AOE cooperative powers, Armor and Weapon upgrades, AI support...
User avatar
Franck83
Priest
 
Posts: 320
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 48 times
Been liked: 50 times
FAF User Name: Franck

Re: How get campaign difficulty ?

Postby speed2 » 16 May 2018, 17:55

in Sim it's ScenarioInfo.Options.Difficulty
1-3, 3 is hard
User avatar
speed2
Supreme Commander
 
Posts: 2922
Joined: 05 Jan 2013, 15:11
Has liked: 514 times
Been liked: 988 times
FAF User Name: speed2

Re: How get campaign difficulty ?

Postby Franck83 » 16 May 2018, 18:01

Ty a lot speed2 !

Very useful for balance !

I just added a kind of AI support for Alliance of Heroes Mod. So AI in campaign missions can promote to classes, upgrade armors, weapons and cast powers !
Alliance of Heroes Mod is out ! Try it ! It's in the Mod Vault !
Advanced Veterancy, insta and overtime AOE cooperative powers, Armor and Weapon upgrades, AI support...
User avatar
Franck83
Priest
 
Posts: 320
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 48 times
Been liked: 50 times
FAF User Name: Franck

Re: How get campaign difficulty ?

Postby speed2 » 16 May 2018, 18:11

In UI you can dig it up from this
Code: Select all
LOG(repr(SessionGetScenarioInfo()))

INFO: {
INFO:   Configurations={
INFO:     standard={
INFO:       customprops={ },
INFO:       factions={ { "cybran" }, { "cybran" } },
INFO:       teams={
INFO:         {
INFO:           armies={ "Player1", "Aeon", "UEF", "Cybran", "Civilians", "Player2" },
INFO:           name="FFA"
INFO:         }
INFO:       }
INFO:     }
INFO:   },
INFO:   Options={
INFO:     AllowObservers=true,
INFO:     AutoTeams="none",
INFO:     CheatsEnabled="true",
INFO:     CivilianAlliance="enemy",
INFO:     ClanTags={ speed2="e" },
INFO:     Difficulty=3,
INFO:     Expansion=false,
INFO:     FogOfWar="explored",
INFO:     GameSpeed="adjustable",
INFO:     NoRushOption="Off",
INFO:     PrebuiltUnits="Off",
INFO:     RandomMap="Off",
INFO:     Ratings={ speed2=1800 },
INFO:     RevealCivilians="No",
INFO:     ScenarioFile="/maps/faf_coop_operation_cepheus/faf_coop_operation_cepheus_scenario.lua",
INFO:     Score="yes",
INFO:     Share="FullShare",
INFO:     ShareUnitCap="allies",
INFO:     TeamLock="locked",
INFO:     TeamSpawn="fixed",
INFO:     Timeouts="-1",
INFO:     UnitCap="1000",
INFO:     Victory="sandbox"
INFO:   },
INFO:   description="Cepheus made by Blodir on twitch stream http://www.twitch.tv/Blodir",
INFO:   map="/maps/FAF_Coop_Operation_Cepheus/FAF_Coop_Operation_Cepheus.scmap",
INFO:   map_version=1,
INFO:   name="Operation Cepheus",
INFO:   norushradius=0,
INFO:   preview="",
INFO:   save="/maps/FAF_Coop_Operation_Cepheus/FAF_Coop_Operation_Cepheus_save.lua",
INFO:   script="/maps/FAF_Coop_Operation_Cepheus/FAF_Coop_Operation_Cepheus_script.lua",
INFO:   size={ 1024, 1024 },
INFO:   starts=true,
INFO:   type="campaign_coop"
INFO: }
User avatar
speed2
Supreme Commander
 
Posts: 2922
Joined: 05 Jan 2013, 15:11
Has liked: 514 times
Been liked: 988 times
FAF User Name: speed2

Re: How get campaign difficulty ?

Postby Franck83 » 16 May 2018, 18:16

Nice, i see that we can retrieve mission name too. So it's possible for me to fine tune the AI upgrade and promote chances depending of the mission and the difficulty.
Alliance of Heroes Mod is out ! Try it ! It's in the Mod Vault !
Advanced Veterancy, insta and overtime AOE cooperative powers, Armor and Weapon upgrades, AI support...
User avatar
Franck83
Priest
 
Posts: 320
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 48 times
Been liked: 50 times
FAF User Name: Franck


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest