Jump to content


Photo

Is there any method to retrieve the teamcolours loaded in a game?


8 replies to this topic

#1 Roderick

Roderick

    3d models loota

  • Members
  • 1,941 posts

Posted 28 August 2017 - 10:50 AM

As trivial as may seem, I think this can have relevant applications in mods. My question is if among the scar is any possibility to know the name of the teamcolour scheme used in a game. 

 

If it can be made, any AI of a mod with diversity could know the teamcolour and pick the right or the expected branch instead of having ultramarines in yellow scheme or alaitoc strategy in ultwé looks.



#2 Gambit

Gambit

    title available

  • Members
  • 6,720 posts
  • Location:Athens, Greece

Posted 28 August 2017 - 11:32 AM

I can only think of one way, but I do not know if it is possible... Here follows an arbitrary conjecture:

 

1] First, we must find where the teamcolour is defined. Brother Kasrkin definitely know this stuff.

 

2] Then we must see IF there is function that can restrict/unrestrict that type of file (like the restrict squad/research/addon function)

 

I can search it if you want, and make a solid post, with a definite answer.
Brother Kasrkin is the real expert here. You could PM him with this question...


-In search of Papasmurf...

#3 Roderick

Roderick

    3d models loota

  • Members
  • 1,941 posts

Posted 28 August 2017 - 11:58 AM

My idea is applying to the AI selection of strategies knowing that either the player has set up a particular teamcolour or has it let as a random pick. That way different branches can have the right looks, which makes the visual experience almost flawless.

 

 Imagine that you can apply to those races in mods where there are several chapters or warbands with a different strategy and specific units. Or make new races knowing that the AI take care of the choice...

 

Isn't Kasrkin available here?



#4 Gambit

Gambit

    title available

  • Members
  • 6,720 posts
  • Location:Athens, Greece

Posted 28 August 2017 - 01:28 PM

To involve the AI in this would entail one more trick, but it IS doable :thumbsupcool: Provided that  what I sad above can be done in SCaR.

 

Isn't Kasrkin available here?

Yes, I think he is: https://forums.revor...8634-kasrkin84/

That is why I suggest to PM him, for a more direct approach method.


-In search of Papasmurf...

#5 Roderick

Roderick

    3d models loota

  • Members
  • 1,941 posts

Posted 28 August 2017 - 03:12 PM

I asked because I couldn't find a direct function in the scar documentation related to this. What are you thinking of?



#6 Gambit

Gambit

    title available

  • Members
  • 6,720 posts
  • Location:Athens, Greece

Posted 28 August 2017 - 05:38 PM

OK, I had a look into SCaR functions and found this:

Misc_PlayerTeamColor( playerID, string )

Where string, is the name of the team colour.

 

So yeah, if this works in normal maps (it works for meta ones) and forces the player to have that specific team colour (regardless choice) on onint,... what you have in mind can definitely be done.

 

But it will require some tricky AI coding (SCaR coding will be a piece of cake if the above function works).

In other words,... me  :good:

 

If you want, I can try it.

Not a complete scheme, but enough for you to make it work AS YOU PLEASE.

 

The question is if you want it before, or after Vostroyans, :p

 

P.S.: Dammit, my workload is  immense!


Edited by Gambit, 28 August 2017 - 05:41 PM.

-In search of Papasmurf...

#7 Roderick

Roderick

    3d models loota

  • Members
  • 1,941 posts

Posted 28 August 2017 - 08:24 PM

Ah it's the other way around? I never thought this possibility. The AI chooses a strategy and then it forces a particular teamcolour. I think the order of loading is first the art and the last is the AI, isn't it? Would then this function override the first colourscheme?

 

The field test is without shadow of doubt, the Craftworld Eldar. Therefore Vostroyan first.


Edited by Roderick, 28 August 2017 - 08:24 PM.


#8 Gambit

Gambit

    title available

  • Members
  • 6,720 posts
  • Location:Athens, Greece

Posted 29 August 2017 - 10:12 AM

I am not sure how the function above works, so I cannot say.

 

The order AI->SCaR or SCaR->AI will have to comply to (and will be chosen by) that functions' ... functionality.

Worry not, I can also make the SCaR choose an AI tactic based on factors, and pass it to the AI.

All that is required is some dummy researches, a scar order to force them, and then the AI to check which was forced and choose the appropriate strategy.

 

This is a call for all three AI/AE/SCaR sectors, so worry not, when CraftWorlds land, I will take care of it.

NICE idea by the way.

 

So yeah, lets finish Vostroyans first.

Will have coded my pass of fixes in a matter of hours. :thumbsupcool:


-In search of Papasmurf...

#9 Kasrkin84

Kasrkin84

    title available

  • Members
  • 329 posts
  • Location:Birmingham, UK
  • Projects:Strongholds, Unification

Posted 16 September 2017 - 12:14 AM

The teamcolours must be defined during the OnGameSetup phase (i.e. during the loading screen for a mission) and no later, whereas the AI can be messed around with using SCaR at pretty much any point during the mission.

 

One thing to note though is that defining team colours requires RTX texture files for ALL of a faction's units. Unfortunately, Soulstorm lacks these for some units (all DE and SoB units, as well as all air units and some of the commanders) so to implement such a function you would need to add the missing RTX files, which all together can add up to a substantial filesize.


Edited by Kasrkin84, 16 September 2017 - 12:16 AM.




Reply to this topic



  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users