(2015-11-08, 08:14 PM)Halyn Wrote:
(2015-11-08, 02:33 PM)Phoenix Wrote:
(2015-11-08, 02:22 PM)Sumane Wrote: i would guess, the easiest way to do this, would be to take a inside layout of a currently usable house/building (for example small generic house), have it as an instance for the building/apartment block. So for example, there are a few tall building on the right as you come out of corronet star port. You would create and NPC "security guard" outside these building with which u converse with. he gives you the option to purchase or rent and apartment. once purchased or rented, you could talk to him at any time to enter you apartment, you would be instanced to the generic small house structure.
Interesting idea.... I might have to test this idea.
I've had that on my to-do list for a while, but the priority's never been high enough to get to it.
Alternatively, instead of having a security guard outside, you could connect the interior files for one of those generic structures and put a terminal right inside. (A big chunk of those buildings actually have very small interiors that I'd guess were never finished because it was triaged out before the game launched.)
As someone who ran a live server for 4 years and did this, I can tell you its a LOT simpler than all of that. All of the above is true, BUT is optional, not required to make a NPC city usable to players (or even make them into actual player cities).
This is based on using SWGEmu, but same is likely true for other servers too...
Client side mods...
You will have to edit the planet IFF data tables to remove the "client region" data for the city you want to use (its a LOC value and a radius)
Server side mods...
Make the same mod to the client files copied to the server
...thats it...BAM..the city is now open for player structure placement. Its no more complicated than that. Its only when you want to clear out existing structures that it gets a bit more complicated..but even that is easy...
Just find the .WS (world snapshot) files for the planet in question, location the building you want to go away, and remove it from said WS file using an editor. (I did it in test, removed the Coronet SP completely, and you need to do it on BOTH the server, and the client).
Making the NPC city into a player city...
This is not hard, but it takes clearing out some space to make room for a player city hall, and you will want to edit the server side player city LUA config file to increase the player city radius value to make it all fit inside city limits.
FYI...you really do want to clear out those client regions firt..Bad things happen when a player city radius overlaps a client region..but there are some caveats abour client regions you need to know, in regards to the NPC shuttle system.
The way the SWGEmu shuttle system is written, its tied to said shuttles being inside client regions, as such the shuttles will not function if NPC shuttleport is not inside a client region, but as I mentioned before, player cities should not overlap client regions.
What it takes, is some construction, that is moving the starport outside of city limits into its own client region (then adjusting the server LUA config to match the new location data).Moving the starport is easy, as its a matter of entering new location data in the WS files (can even change the starport type, like use the platform starports like on Endor, instead of those mammoth ones used by default.
Then go ahead and remove the existing NPC shuttleports from the WS files. THen the city Mayor is free to place a player shuttleport in the city. You may also move the NPC shuttleport outside city limits into their own client region if you want as well.
Or you can do like we had done late on Tarkin, is not use the NPC shuttle code at all, and instead ran our travel network off of a screenplay script, which allowed us to have lots of custom locations, NPC conversations, and was quite easy to manage (and the SP never got "blown up by terrorists" that way). We only used it as far as player city shuttles were concerned.
It is possible to keep client regions inside of player city limits, but its a PITA to maintain. I say its a pain, because you have to first remove the client region data, start the server, place the city hall, then shutdown, put the client regions back in, then restart, and it has to be in that order, and the city hall cannot be inside a client region period (server crashy, big time)
That lets you keep the NPC shuttles/SP working inside a player city, BUT its a bit on the flaky side. The SWGEmu travel system is a bit wonky to begin with, and doing this takes into clearly into "not supported" use cases. As far as I can tell over time, you can get some weird data stored, and no real good way to clear it out after the fact. Buyer beware.
One can also make life easier in NPC cities if they are willing to make source code changes to the server, namely the code that checks for overlaps in the housing placement code. Its pretty simply to disable certain checks that will not only allow you to place houses VERY close to each other, but you can "imbed" them into existing NPC structures (works really well in Theed)
Im happy to answer questions about all this..it was a hallmark of the Tarkin server, being able to use the NPC cities, being able to have the best of NPC city features AND player city features in the same city.
FYI...most player city functions do work on NPC terms, like city taxes will work on the bazaar terminals, and city specializations and city bans are fully effective. The only piece that does not work are travel taxes on NPC shuttleports inside client regions. (for instance, Coronet on Tarkin was an Improved Job Market, and was our prime vendor marker (lots of merchant tents set up in the market square near the SP, full of player run vendors)
anyway..,its all not very hard at all.