Login

russian armor

Are squad groups dynamic, or merely a table of squads?

15 Mar 2018, 17:44 PM
#1
avatar of EagleOne

Posts: 12

Hi modders,

I'm curious how squad groups work. I'm creating defense game mode, with different difficulty configurations. It is coming along pretty well. One of the parameters I'm trying to play around with for the harder difficulties is the enemy units' received suppression.

To do this, I planned on using something like:

Modify_ReceivedSuppression( Player_GetSquads(aiPlayer), suppression_scale )


Is a squad group just a table of squads? Does the squad group created by Player_GetSquads() create a "snap-shot" of that player's squads at the moment it is called, or does it dynamically update as new units are created by that player?

If it is the former, I imagine I would need to create a rule function that continuously calls the the above code to ensure all new units created are applied the same modifier.

This also leads to another question: are Modify_X functions by default exclusive? If I apply Modify_ReceivedSuppression across a table of a player's squads more than once, will it compound and multiply with the previous application (eventually trending towards 0), or does it "set" the scale with future function calls.

Thanks for all the help.
15 Mar 2018, 20:00 PM
#2
avatar of Lugie
Senior Modmaker Badge

Posts: 327

You can think of a squad group as a table that does not do anything by itself.

If you want to update that table with newly spawned squads, you would have to call the function again, or add them manually. The main squad-spawning function has a nice little thing built-in that automatically adds the squad(s) to the specified group(s). If you are making a defense mode (im going to assume its wave-based), then you probably dont need to use the function (Player_GetSquads) at all.

As for the modifiers, im pretty sure it depends on what math you use, but most of the time it is a set/exclusive modifier.

Feel free to msg me for some more advice/details.
15 Mar 2018, 21:02 PM
#3
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Most of the modifier functions just wrap Modifier_Create, which has a boolean for exclusive. So if you want to set it to true just use that directly (or make your own wrapper).
15 Mar 2018, 21:49 PM
#4
avatar of EagleOne

Posts: 12

jump backJump back to quoted post15 Mar 2018, 20:00 PMLugie
You can think of a squad group as a table that does not do anything by itself.

If you want to update that table with newly spawned squads, you would have to call the function again, or add them manually. The main squad-spawning function has a nice little thing built-in that automatically adds the squad(s) to the specified group(s). If you are making a defense mode (im going to assume its wave-based), then you probably dont need to use the function (Player_GetSquads) at all.

As for the modifiers, im pretty sure it depends on what math you use, but most of the time it is a set/exclusive modifier.

Feel free to msg me for some more advice/details.


Good to know about the squad spawning mechanic, that will be useful as I introduce other features down the line. Alas, it is not wave based... although that is a fantastic idea! I may have to switch project directions (again). The idea was to "hold the line" (name of the mode) against an endless onslaught of infantry. As the remaining tickets diminish, the AI gets more and more buffs. Approaching 0 tickets they should be virtually immune to suppression. I may take you up on that offer as I inevitably run into more bumps. I have been experiencing many head scratching "gotcha" moments.

jump backJump back to quoted post15 Mar 2018, 21:02 PMeliw00d
Most of the modifier functions just wrap Modifier_Create, which has a boolean for exclusive. So if you want to set it to true just use that directly (or make your own wrapper).


I keep forgetting to check the data archive! Thanks for that, much appreciated.
16 Mar 2018, 03:17 AM
#5
avatar of Lugie
Senior Modmaker Badge

Posts: 327



The idea was to "hold the line" (name of the mode) against an endless onslaught of infantry. As the remaining tickets diminish, the AI gets more and more buffs. Approaching 0 tickets they should be virtually immune to suppression. I may take you up on that offer as I inevitably run into more bumps. I have been experiencing many head scratching "gotcha" moments.


I think you should stick with this idea. Wave scenarios, while easier to make and hard to break, are somewhat overdone. Some new ideas would always be welcome.
16 Mar 2018, 13:50 PM
#6
avatar of EagleOne

Posts: 12

jump backJump back to quoted post16 Mar 2018, 03:17 AMLugie


I think you should stick with this idea. Wave scenarios, while easier to make and hard to break, are somewhat overdone. Some new ideas would always be welcome.


Thanks for the encouragement :) Will do!
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

749 users are online: 749 guests
0 post in the last 24h
12 posts in the last week
26 posts in the last month
Registered members: 49989
Welcome our newest member, LegalMetrologyConsul
Most online: 2043 users on 29 Oct 2023, 01:04 AM