Results 1 to 10 of 10

Enforce unit ratio win condition

  1. #1

    Enforce unit ratio win condition

    This allows you specify how many squads/buildings can be built with respect to another squad/building count.

    Here's how to install it:
    download the scar file and the lua file to your "mod/Data/Scar/winconditions/" directory.

    Here's how to add your entries into the scar file:
    you can open the scar file with notepad(not wordpad). There is a table at the top of the file called "unitRatio_list" and it has entries in the form:

    {"bluePrint", n, "bluePrint", m}

    You can add as many of these as you wan't, I'm pretty sure but make sure you are using a squad or entity blueprint(as they are so named in the attribute editor).

    you must also divide entries with a coma.

    heres how to run it:
    Run your mod and go to game options and "enforce unit ratios" should be on the list of game rules. You can make it a mandatory rule(so others can't unclick it) by going to the lua file(notepad) and changing always_on to true.


    extra notes:
    Any scar errors will make the game stop, you can look at the console to see what they are and then close it.

    The entries I have in the file currently enforce 1 marine squad per generator and one assault marine squad per space marine squad.

    As this uses a rule that is called without an interval(because it enforces unit production) it may add a little overhead or lag. You can fix this(but make it possible to add to production between cycles) by changing the "Rule_Add(Rule_EnforceUnitRatio)" to "Rule_AddInterval(Rule_EnforceUnitRatio, seconds)" I have not yet confirmed if this scar will cause sync errors etc. I make no guarantees etc etc.

    If you wan't to give me credit you can but not required.

    Comments or suggestions please post.
    Last edited by Adovid; 4th Mar 08 at 11:20 PM.

  2. #2
    nice
    You can not change your fate.YOU WILL DIE!

  3. #3
    Member
    Join Date
    May 2007
    Location
    Right at the back of your mind, chipping away at your sanity
    Sorry I'm a bit dumb and don't entirely get this - Does this trigger a win when you reach x amount of units/buildings?

  4. #4
    no no- It isn't a win condition that changes how you get victory. Its a win condition that changes the rules of the game so you can only make a unit with respect to how many other units(of a certan type) you have.

  5. #5
    Member
    Join Date
    May 2007
    Location
    Right at the back of your mind, chipping away at your sanity
    Oh so like if you have 5 space marine tactical units you can only make like 1 terminator unit for example, then you have to have another 5 space marine tactical units to get another 1 terminator unit?

  6. #6
    yup, thats the ratio 1:5. And it would be respresented with {"space_marine_squad_terminator", 1, "space_marine_squad_tactical", 5}.

  7. #7
    Wasn't the Deathwing team looking for something like this?

  8. #8
    Member
    Join Date
    May 2007
    Location
    Right at the back of your mind, chipping away at your sanity
    Erm dumb question time - can this be done without Scar. I need to do something similar to this to restrict the number of vehicles you can take per troops unit but I don't want to have to rely on putting it in as a win condition...
    Dark Angel Within, Dark Angel Without, Dark Angel Forever.
    Get your Soulstorm Skirmish/Multiplayer Wargear mod here or check out the thread here

    Now on Facebook as Raven Morpheus, there's only one...

  9. #9
    Nope, that is why I made this. As I was trying to figure out a way to do it with hard caps. Not possible to modify those on the fly though.

    Sorry for the late reply. I have been other places.

  10. #10
    Member
    Join Date
    May 2007
    Location
    Right at the back of your mind, chipping away at your sanity
    Hmm ok. I'll go back to the drawing board. I'm trying to make my uber-mod more like the TT game where you can only take a certain amount of units. I.E. 3 elite units, 6 troop units, 3 heavy support units, 2 hq, 3 fast attack (for a standard detachment anyway).

    I guess I can do it with hard caps but it's a bit of a long way around. Thanks anyway

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •