How get campaign difficulty ?

Everything about mods can be found here.

Moderator: Morax

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 !
User avatar
Franck83
Evaluator
 
Posts: 538
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 114 times
Been liked: 122 times
FAF User Name: Franck83

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
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 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 !
User avatar
Franck83
Evaluator
 
Posts: 538
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 114 times
Been liked: 122 times
FAF User Name: Franck83

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
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 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 !
User avatar
Franck83
Evaluator
 
Posts: 538
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 114 times
Been liked: 122 times
FAF User Name: Franck83


Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest