Announcement

Collapse
No announcement yet.

Can you...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can you...

    1) change the Units available to a civ, and make it available to just 1 civ only (like the UUs in Civ III)
    2) Rather than colours for the unit shield icon, have a .gif or .tga?
    3) How do you script events in text?
    4) How do you script events in units? (e.g. a new unit appearing out of nowhere)

    This may be far-sighted, but I'd like to know my boundaries for the Imperialism scenario

  • #2
    1) This is not trivial, but it should be possible - you have to create a tech unique to each civ (or whoever is to be able to build the unit) which the unit requires and somehow ensure that this tech is not spread around the other civs (which should be possible, but i don't remember how offhand).

    You also might try to make the units government-specific, and restrict the civ to some specific government.

    2) I've no idea, but I don't think so.

    3 & 4) Both use SLIC - see docs here on Apolyton or on Locutus's website.

    Comment


    • #3
      1) As John says, create a unique advance for every civ, and make sure this civ can't be researched (e.g. give this advance itself as prerequisite). Then use the scenario editor or SLIC to give this advance to the proper civ. Now you only need to make sure these advances aren't traded, which might be tricky. Might be best to just disabled advance-trading altogether.

      2) AFAIK not possible.

      3/4) If you have no programming experience, it could be tricky getting started, but don't hesitate to ask for help. It's been a while since I last coded SLIC1, but I'll try to help if you want. Next to the sources John mentioned, also look at existing SLIC code. Learn-by-example is the best way to go with SLIC.

      I'm not sure what you mean by 'events in text', but I assume it is having a textbox pop up with a certain event? If so, here's a simple example:

      Code:
      trigger 'Example1' when (g.player == 1 && g.year == 10) {	
      	Message(g.player, 'ExampleMessage1');
      }
      
      messagebox 'ExampleMessage1' {
      	Title(ID_INVASION_TITLE);
      	Text(ID_INVASION);
      	Show();
      }
      Where in turn 10 (g.year == 10), the human player (g.player == 1; usually the human is player 1) gets a message warning him that Poland is being invaded by the Germans or whatever (yes, I know, wrong scenario). The above code should be put in a *.slc file in default\gamedata, while the strings INVASION_TITLE and INVASION (without the ID_ prefix) should be placed in a file in english\gamedata.

      To make create a unit in turn 10, just replace Message(g.player, 'ExampleMessage1'); with e.g. CreateUnit(1, UnitType("UNIT_TANK"), MyCity.location, 0);. That would create a human (player 1) tank in MyCity (assuming you defined MyCity somewhere else).

      Of course, what you put in between the braces {} of the trigger is entirely up to you. You can limit it to simply calling a message or creating a unit (as above) or you can create monsters of hundreds of lines of code with a lot of conditions, loops, functions, etc. You could set up entire invasions, terraform the entire map, set up an entire text-box dialog or internal data structure, etc, etc (see for some examples the 'SetupRandomMap' trigger in my Flatmap code or the 'DiscoveryDisseminates' trigger in the MedMod -- but don't be intimidated by them too much ).

      If you have more specific request for help, let me know. It would probably be best to start a new thread for it in the Creation forum.
      Last edited by Locutus; May 26, 2003, 09:29.
      Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

      Comment


      • #4
        The shield icon is a *.rim file and can be replaced, but that would be a global replacement, so there won't be different icons for this civ and that civ.

        -Martin
        Civ2 military advisor: "No complaints, Sir!"

        Comment

        Working...
        X