This site has been archived and made available for preservation purposes. No edits can be made.

Results 1 to 2 of 2

Thread: Server-side leveled world objects

  1. #1
    Administrator
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    1,057
    Blog Entries
    5

    Server-side leveled world objects

    We are getting closer to the point where we want to think about generation of dynamic objects like items, items in containers, creatures and actors.

    Fallout 3 / New Vegas modders should be familiar with "Leveled lists" which do just that. However, vaultmp disables any leveled / random facilities from the game. We need a server-side solution for that, which, based on factors needed to be discussed, replaces the singleplayer logic.

    I plan on making this behaviour fully customizable through scripts. Default leveled list data found in the base game is available to the server. For scripts, I'm thinking about something like:

    Code cpp:
    State VAULTSCRIPT OnLeveledItemStreamIn(LeveledList item, Cell cell);
    State VAULTSCRIPT OnLeveledContainerStreamIn(ID container, LeveledList item, Cell cell);
    State VAULTSCRIPT OnLeveledActorStreamIn(LeveledActor actor, Cell cell);
    State VAULTSCRIPT OnLeveledCreatureStreamIn(LeveledCreature creature, Cell cell);
    State VAULTSCRIPT OnEncounterZoneStreamIn(Zone zone);
     
    State VAULTSCRIPT OnLeveledItemStreamOut(LeveledList item, Cell cell);
    State VAULTSCRIPT OnLeveledContainerStreamOut(ID container, LeveledList item, Cell cell);
    State VAULTSCRIPT OnLeveledActorStreamOut(LeveledActor actor, Cell cell);
    State VAULTSCRIPT OnLeveledCreatureStreamOut(LeveledCreature creature, Cell cell);
    State VAULTSCRIPT OnEncounterZoneStreamOut(Zone zone);
     
    State VAULTSCRIPT OnActorEnterEncounterZone(Zone zone);
    State VAULTSCRIPT OnActorLeaveEncounterZone(Zone zone);
    ...

    The "StreamIn" callbacks will run whenever something enters an abandoned (that means, no active AI entities present) cell / zone which is supposed to change the state of that area. That includes players, actors and creatures (with active AI).

    "StreamOut" callbacks are the opposite and are called when the last active AI object leaves the cell / zone.

    Exterior cells will be grouped into at least blocks of 9 (cell depth of 1) individual cells, meaning that once an AI object enters a new cell, several cells may be streamed in / out at once.

    Returning True in the "Stream"-callbacks (which is the default) will trigger vaultmp's algorithms. Returning False won't have any effect on the in-game state; optionally, the scripter can perform desired changes inside the callback block.

    Information about active objects spawned by a leveled list (active: has not been picked up or explicitly removed*) is available in the callbacks (and anywhere else).
    * (killed actors or creatures will remain dead, if no respawning has been explicitly enabled - they will only get removed if this has been issued by some policy)

    The "Enter/LeaveEncounterZone" callbacks should be self-explanatory. Note that OnCellChange can be used for cells in general.

    VaultMP will NOT use leveled lists supplied by the main ESM (optionally DLC / user mods) files unless explicitly turned on. This is to keep the unmodified experience as light as possible (note that there are still static world objects, items and actors). Enabling main game leveled lists will be as easy as changing a config setting / one line of code.

    Feedback and suggestions are very welcome

    NOTE: vaultmp does not yet have any server-side AI for actors. It will take quite some more time until we have that. Above ideas will be implemented solely for items and items in containers at first.
    Last edited by foxtacles; 08-26-2012 at 02:51 AM.

  2. #2
    I think this is a great idea.
    I will try to help you with the server-side AI, i researched a lot about path finding some time ago

    Roby

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •