escape maps and LUA support

Discussion in 'Mapping' started by Blight, Jul 3, 2010.

  1. Blight

    Blight Member

    Messages:
    167
    Likes Received:
    0
    Trophy Points:
    0
    Hi everybody of the old guard who hasn't left!

    In a few weeks I'm going to have some spare time and I was thinking of making an escape map for Empires, something I wanted to do for a long time.

    To anyone who doesn't know what an escape map is, I found a good description on the Fortress Forever forum:

    There are a lot of problems with the engine/Empires to make such a map work but I thought with the devlopments concerning LUA it might be possible to create the logic needed. I know my way around Java and PHP so I don't think the coding itself will be a problem. I am unsure however of how to interface the scripts with a source map and also if LUA is even supported or not. I once read it was going to be supported but later I was told that it wasn't implemented but could be done in a short timespan.

    Can a dev comment on this?
     
  2. Brutos

    Brutos Administrator Staff Member Moderator

    Messages:
    3,385
    Likes Received:
    0
    Trophy Points:
    0
    There is barely any LUA supported or used atm, I have recently implemented a scriptable research conditions with lua. But you can tell me what you want you'd like to see implemented.

    Also welcome back friend.
     
  3. blizzerd

    blizzerd Member

    Messages:
    10,552
    Likes Received:
    60
    Trophy Points:
    0
    hey blight, good times ^^
     
  4. Metal Smith

    Metal Smith Member

    Messages:
    4,520
    Likes Received:
    3
    Trophy Points:
    0
    isn't a blight bad times?
     
  5. Empty

    Empty Member

    Messages:
    14,912
    Likes Received:
    11
    Trophy Points:
    0
    Just use I/O.
     
  6. Blight

    Blight Member

    Messages:
    167
    Likes Received:
    0
    Trophy Points:
    0
    The hammer I/O is not very efficient in handling complex logic. It took me a long time and lots of entities to get the firing range in one of the tutorial maps working. While using code it could be done with a few functions and some logic.

    Escape maps usually have all players on one team but I can see that's not really possible right now and adding the support just for one map is a bit retarded. I kind of fixed this in a short escape map I once made for Empires by having both teams face equal challanges with glass walls between them. This way there could be some kind of competition between both teams.

    A bigger problem is that players can no longer stack with soft collisions (I think). This used to be a big element in escape maps.

    What would be nice and not just for my map is the ability to restrict classes. This has no doubt been brought up before but I think this will make a lot of other mappers happy as well.

    Fortress Forever fully integrated LUA so I can give you an example of how it works there.

    Whenever you have a reference to a particular entity, you can use its functions to control its behavior.
    Code:
    -- find the flag and cast it to an info_ff_script
    local flag = GetInfoScriptByName("redflag")
         -- Make sure flag isn't nil
         if flag then
              -- check if the player is carrying the flag
              if player:HasItem(flag:GetName()) then
    		-- return the flag
              	flag:Return()
              end     
         end
    
    Using this system the mapper can also create his/her own complex gamemodes.
     
  7. Empty

    Empty Member

    Messages:
    14,912
    Likes Received:
    11
    Trophy Points:
    0
    I'm not saying lua won't eventually get implemented but if you want to do something like this you have to use I/O for now.
     
  8. MOOtant

    MOOtant Member

    Messages:
    4,047
    Likes Received:
    0
    Trophy Points:
    0
    With close cooperation with coder (Brutos/me/dunno) it is possible to split the code so some parts can be overriden in Lua.
     
  9. ViroMan

    ViroMan Black Hole (*sniff*) Bully

    Messages:
    8,382
    Likes Received:
    4
    Trophy Points:
    0
    sounds interesting...
     

Share This Page