SWGEmu – A Server-Client Mod to Build Walls, Bridges, Posts, and other Static Objects

After spending a few hours puttering away at editing the layout of Mos Espa recently, by way of using Sytner’s IFF editor and my dev game client/server to edit the Tatooine world snapshot file, I’d had enough. It was time to make myself the ability to move and rotate walls, pillars, bridges, and all manner of other “static” type objects that we can’t normally manipulate in the game, because bumping numbers and rebooting the server ad nausium isn’t a fantastic use of my time. So, I did.

At the moment I have only added two items to the system, but I figured I would share it now as, system wise, it’s complete and functional. “Just” need to add more items to it and I will add a guide for that aspect, because I am most likely only going to be adding the Tatooine items and some misc stuff for my purposes. It’s not a hard process, just time consuming, because there are lots of items.

Here is a video of me walking through the steps to add an item:

The commit to my Legend of Hondo repo for this feature is here,
https://github.com/Tatwi/legend-of-hondo/commit/d724dad170349ecac243e9c561684c1241a597a0

Here’s how it works:

1. I created new “tangible object” iff files for each static item, using a potted plant as template, added them to the CRC table file, and added the server side lua files required. Same process as adding any new item in the game, only I simply pointed the appearance template inside the iff to the static object I wanted rather than the plant (I did also change the name and description to ” ” and a common description in the string files). Note that is required adding the new iff files to a TRE file for the client and server.

2. I added these items to an otherwise unused terminal type, using the Character Builder system, so that admins can easily spawn them and get to work.

3. I added a new function to the /getObjVars command that spits out a spawnSceneObject screenplay command which points to the original static object version of the item, rather than new tangible version the admin is working with. This is so we can work with the fully manipulable targetable version, but load the normal non-targetable version as the final product.

/getobjvars static
Example Output:
spawnSceneObject(“tatooine”, “object/static/structure/tatooine/shared_wall_archway_tatooine_wide_style_01.iff”, -2980.62, 5.0, 2528.85, 0, 0.963207, 0, -0.268761, 0)

Summary

So that means that the workflow is the same as decorating normally, even while outside using bridges, walls, pillars, and so on. Just drop, move, rotate, hit your /getObjVars static macro, open your chat log text file, copy/paste the code into your screenplay!

Now it’s a matter of adding more tangible versions of these static items (many already do exist btw) and to see if the same general principle can be applied to buildings. If buildings are possible, then effectively would give us SWGEmu modders a basic “World Building Tool” that’s built right into our development server/client. In any event, these tools I have made aren’t perfect, but they do have the benefit of being open source, free, and available right now.

List of changes/new files:
bin/scripts/object/allobjects.lua
bin/scripts/object/tangible/beta/donham_terminal.lua
bin/scripts/object/tangible/furniture/static/structure/tatooine/objects.lua
bin/scripts/object/tangible/furniture/static/structure/tatooine/serverobjects.lua
bin/scripts/object/tangible/furniture/static/structure/tatooine/wall_archway_tatooine_large_style_01.lua
bin/scripts/object/tangible/furniture/static/structure/tatooine/wall_archway_tatooine_wide_style_01.lua
bin/scripts/object/tangible/serverobjects.lua
bin/scripts/screenplays/hondo/tests.lua
bin/scripts/screenplays/screenplays.lua
src/server/zone/objects/creature/commands/GetObjVarsCommand.h
tre/misc/object_template_crc_string_table.iff
tre/object/tangible/furniture/static/structure/tatooine/shared_wall_archway_tatooine_large_style_01.iff
tre/object/tangible/furniture/static/structure/tatooine/shared_wall_archway_tatooine_wide_style_01.iff
tre/string/en/frn_d.stf
tre/string/en/frn_n.stf

Advertisements