Script manifest

Discussion in 'Archive' started by Jephir, May 19, 2012.

  1. Jephir

    Jephir ALL GLORY TO THE JEPHIR

    Messages:
    1,409
    Likes Received:
    6
    Trophy Points:
    0
    Script manifest allows scripts to be loaded from a specified folder. There are a default set of scripts in scripts/default. To use script manifest, copy the scripts/default folder, make your script modifications, then set emp_script_path to the folder. In multiplayer, emp_script_path is automatically replicated to clients.

    Example:
    1. Copy the scripts/default folder to scripts/mycustomscripts
    2. In server.cfg add emp_script_path scripts/mycustomscripts/
    3. Restart the server
    Important: There must be a trailing slash at the end of emp_script_path or the game will crash.

    If you encounter any bugs with the script manifest system please post them here.
     
  2. ViroMan

    ViroMan Black Hole (*sniff*) Bully

    Messages:
    8,382
    Likes Received:
    4
    Trophy Points:
    0
    just curious... does the client download scripts from the server each time a player loges in while always overriding the same default scripts. That is to say... it doesn't check if they are the same... it downloads anyways.
     
  3. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    There's no download system. The idea was that Jephir is trying to set the system up to work, and I said I'd take care of the download using sourcemod plugins, rather than waste time adding it natively. I asked Jephir to post up how to use this because, quite frankly, I had no fucking idea.

    Jephir, are any quotation marks needed around the path in the server.cfg?
     
  4. Jephir

    Jephir ALL GLORY TO THE JEPHIR

    Messages:
    1,409
    Likes Received:
    6
    Trophy Points:
    0
    This is managed by the download system being used. Script manifest just sets the path to the script folder.
    Nope, but I haven't tested with quotation marks, so the script path shouldn't contain any spaces.
     
  5. Ducky

    Ducky 2D Artist

    Messages:
    158
    Likes Received:
    0
    Trophy Points:
    0
    When are scripts reloaded after changing the path var, on map change or does it need a server restart ?
     
  6. Jephir

    Jephir ALL GLORY TO THE JEPHIR

    Messages:
    1,409
    Likes Received:
    6
    Trophy Points:
    0
    On the server, scripts are loaded when the server is started. So you'll have to restart the server to apply script changes.

    On the client, scripts are loaded when the game starts and then reloaded when joining a map.
     
  7. ViroMan

    ViroMan Black Hole (*sniff*) Bully

    Messages:
    8,382
    Likes Received:
    4
    Trophy Points:
    0
    That seems strange for the client to load the scripts when starting up if its going to load them again when joining a map. Does the HL2 engine demand that scripts be loaded at start?
     
  8. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    ViroMan, how is the client supposed to load serverside scripts before he's joined the server?
     
  9. Beerdude26

    Beerdude26 OnThink(){ IsDownYet(); }

    Messages:
    7,243
    Likes Received:
    13
    Trophy Points:
    0
    [​IMG]
    FUCKIN' CLIENT-SERVER MODEL,
    HOW DOES IT WORK?

     
  10. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    Stop pretending that code makes any sense at all, it's just a random crap grouped together. It loads scripts whenever it wants. Any kind of hot swapping requires big rewrite.
     
  11. Kylegar

    Kylegar Specstax Rule

    Messages:
    2,170
    Likes Received:
    0
    Trophy Points:
    0
    Oh, look, the same issue I ran into when I implemented this the first time
     
  12. Jephir

    Jephir ALL GLORY TO THE JEPHIR

    Messages:
    1,409
    Likes Received:
    6
    Trophy Points:
    0
    What issue?
     
  13. Trickster

    Trickster Retired Developer

    Messages:
    16,576
    Likes Received:
    46
    Trophy Points:
    0
    I have the sourcemod downloader system working, it all downloads fine.

    As for the actual results ingame, some of it seems to be loading, not sure about other bits though.

    Firstly, I changed the weight on the MG. Whilst the pane on the left of the vehicle creation didn't update to reflect the new weight, the description at the bottom did. It totalled up the new weight without any issues, although I wasn't able to try making it heavier than it was supposed to be, only lighter, due to the next issue.

    [​IMG]

    You can't customise a vehicle. Whilst I could be entirely wrong, I think Empires might actually build vehicles based on your preset, hence it gets overwritten each time. The problem is, every time I customised my vehicle, as I went to click build, it was sent back to the regular preset, I couldn't change it.

    Finally, I'm not entirely sure if everything is being reloaded. It's difficult to tell what's clientside and what's serverside on your own, but I think the rate of fire of the MG I changed worked, as did the speed/gravity of the standard cannon, however, whilst the GUI was adopting the RoF change of the standard cannon, it didn't seem to be firing fast enough to match that. I wasn't able to change any other weapons and test them due to being unable to customise and not having anyone to test with at the time, so we'll do some more investigating tonight.

    Oh, and one extra thing, I notice you didn't copy the infantry scripts or the handling scripts (scripts/nf or imperial folders) into the default folder. Are they supported for script manifest?
     

Share This Page