Results 1 to 30 of 41

Thread: CA's Modding FAQ

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    "Aye, there's the rub" Member PSYCHO V's Avatar
    Join Date
    Aug 2004
    Location
    Australia
    Posts
    3,071

    CA CA's Modding FAQ

    CA is doing a Modding FAQ. So for all those questions that Jerome and others haven't got around to answering yet, post them here.
    PSYCHO V



    "Ask not for whom the bell tolls, it tolls for THEE!" - (John Donne, Meditation 17)

  2. #2

    Arrow Re: CA's Modding FAQ

    How do you change/edit the roman factions into another faction in 1.3?

  3. #3
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: CA's Modding FAQ

    Can console_command event be used to (re-)spawn factions?
    If so, can you give us the syntax?

  4. #4
    The Dark Knight Member wlesmana's Avatar
    Join Date
    Jan 2005
    Location
    Indonesia
    Posts
    602

    Default Re: CA's Modding FAQ

    How do you mod gate houses' arrows and boiling oil?

  5. #5
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: CA's Modding FAQ

    Could a list be provided of the exact areas and/or specifics (where feasible) of the hardcoded elements in BI? This would save modders wasting time on impossible pursuits.
    "One of the most sophisticated Total War mods ever developed..."

  6. #6

    Default Re: CA's Modding FAQ

    Question1:

    Is it now possible to use descr_skeleton.txt, and does the game parse it?


    --------


    Question 2:

    Can any scripting functions take counters as parameters, instead of requiring explicitly defined numbers? For example, is it possible to do a script where you do a for() loop, replicated by the game's while command, which browses through each tile on the campaign map, and if it finds a general of one's faction there, to place another general in that spot? Speaking in pseudo-code, this would work like:

    Code:
    define counter x
    define counter y
    
    for (x from 0 to map's known width) {
       for (y from 0 to map's known height) {
          if (character X is at tile x,y) // possible to do using CharacterNearTile
             spawn_army at x, y
             ...
             end
       }
    }
    There the x and y are not specifically defined, but are whatever the counter values may be at that time.

    Right now it might seem that all commands require explicit specification of the location, so that if we wanted to replicate the code above using RTW's scripting code, we'd have to explicitly unravel those two for() loops (i.e. the two "while" loops) and explicitly say,

    if (General X is present at 1,1)
    spawn_army at 1,1

    if (General X is present at 1,2)
    spawn_army at 1,2

    which, considering the size of maps in the game (with both dimensions spanning hundreds of pixels), means that there theoretically will be 10,000 such if loops in order for the script to be able to find General X and place a new army wherever General X might be on the map. And if you have more than one general...

    Now granted, optimization is possible and we can use a binary search instead of a linear search (using hidden virtues to divide the map into quadrants, and then search only in that quadrant:

    Code:
    if General X has trait xLocationUnder 50 
       and General X has trait yLocationOver50 
       and has trait yLocationUnder100)
    
       search x from 0 to 50
         search y from 50 to 100

    Still, however, this optimization improves only the actual performance of the script, and still requires a whole lot of coding from the scripter, compared to how easy it could be if counters can be variables.

    I have tried this use of counters as variables for two commands: "reposition_character", and "console_command move" command, and for both of them, if I use an expression such as "x, 120" to specify a location, the engine will place the character at 0, 120, regardless of the value x currently holds.
    Last edited by SigniferOne; 10-24-2005 at 19:25.

  7. #7
    Spends his time on TWC Member Simetrical's Avatar
    Join Date
    Dec 2004
    Location
    New York City
    Posts
    1,358

    Default Re: CA's Modding FAQ

    Quote Originally Posted by Dol Guldur
    Could a list be provided of the exact areas and/or specifics (where feasible) of the hardcoded elements in BI? This would save modders wasting time on impossible pursuits.
    This is asking a heck of a lot. More specific questions would probably be more productive.
    TWC Administrator

    MediaWiki Developer

  8. #8
    Senior Member Senior Member Jambo's Avatar
    Join Date
    Jul 2002
    Location
    Athens of the North, Scotland
    Posts
    712

    Default Re: CA's Modding FAQ

    Quote Originally Posted by wlesmana
    How do you mod gate houses' arrows and boiling oil?
    Second this question!
    =MizuDoc Otomo=

  9. #9

    Default Re: CA's Modding FAQ

    I would like to know about the destroy building command, secondly, I would like to know if they have any easy way to sort through the names of the current generals via scripting. Once the game starts its pretty impossible to figure out what the current faction leaders name is,(This is for useing counters and trasnferring them across as traits) I have a work around but its ugly as hell, so i would like to know about name sorting.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO