Login

russian armor

Winconditions assistance for Lua modder

26 Dec 2014, 11:43 AM
#1
avatar of 11rednammoc

Posts: 1

Hey guys, I really am happy with the toolset and I'm excited to get started on my own mod but I'm a little disappointed in the lack of documentation for various little things. It'd be nice if there was a wiki that we could all contribute toward but I guess that's a fantasy.

I've got my test tuning pack and wincondition working but a few things I'm wondering about first, how do I edit start units and buildings?

My objective is to make a mod that will keep gameplay as-is for the computer but disable/change things for the player. Currently my mod is the basic win/scar file except I changed MaxPopulation can anyone help me out further?
29 Dec 2014, 00:48 AM
#2
avatar of trigg

Posts: 139

Win condition files and tuning packs both allow substituting starting buildings/units for factions (the latter with an ugly hack), but I don't know of a way for doing it only for human players.

However, your win condition's script can do it by iterating over the players to detect which are humans, and for those it can use conditionals to detect which factions they are, then just delete the default starting unit for that faction and spawn the new one(s) you want them to have.

Buildings may be more challenging. For base bunkers you can probably use the script to collect all the entities of the relevant type, iterate over that list, and for each one find the location and orientation, destroy it, and spawn what you want using the same location and orientation.

But I don't think that would work for the HQ building.
0 user is browsing this thread:

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

577 users are online: 577 guests
0 post in the last 24h
2 posts in the last week
28 posts in the last month
Registered members: 49388
Welcome our newest member, KETTA
Most online: 2043 users on 29 Oct 2023, 01:04 AM