Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bounty/Request: Reduce Structure Placement Restrictions (CLAIMED!)
#1
Lightbulb 
UPDATE: Bounty has been claimed by Halyn!, the solution is to edit the .sfp files CLIENT side, no changes need be done server side, the most leeway values you can have without "breaking" something are as follows:

Best calculation is by plot size this is if you wish to avoid "flying" bits of the structures on 99% of placements and still have door accesible:

Ran most tests and they check out, so you should be safe with these numbers

Will update as we tweak them.

Industrial:
1x1:4
2x2:4
3x3(Factories/Merch tents): 5
3x4(Harvesters): 5
5x5 and bigger(Structure Factory):7

Exceptions
Wearables Factory: 7

ResidentialSadx2 of industrial in plot size)
Guildhalls/large/medium houses:14 (2x of 5x5)

GCW:
(will check at a later date but will also report altho these do "flatten" terrain around them. so im not sure how they do it but i suspect angle is not too much of an issue for these)

City Buildings:
Theater: 10
Cantina:14
Cloner: 10
Gardens: 7
Garage: 14
DO NOT MOD, anything over default causes it to fly:
City Hall
Hospital
Bank
 

Special Structures:


I hope everyone enjoys this mod as much as we are, its the best mod ever since server draw distance 750! both these mods make up for a stunning city, will post pictures


===================== Original Post ========================
What the title says

We want to reduce structure placement restrictions to where any structure can be placed in any terrain up to a 45 degree angle difference between one of its sides and the other (currently its around 5 degree angle maxium)

We hereby offer a bounty of $50, $75, to the first person that posts here (and we can successfuly replicate it) the code/file changes required to excecute this modification.


Heres what we know so far:

Modification to allow housing and buildings to be placed on slightly less uneven terrain

Identified server side files and modified them with no success:

All files on:
bin/scripts/object/installation/*.*

/src/server/zone/managers/structure/*.*
StructureManager.*

Posibly:
/src/templates/footprint/StructureFootprint.h
/src/templates/installation/FactoryObjectTemplate.h
/src/templates/installation/SharedInstallationObjectTemplate.h
/src/templates/intangible/*.*

However this modification possibly also requires changes CLIENT side to support these features, that includes modifying the following files on the following TREs

Every SFP file inside:
footprint/*.*
clientdata/building/*.*

And Possibly these:
object/static/base/shared_static_base.iff
object/static/base/shared_static_default.iff
object/static/installation/*.*
object/installation/*.*
object/construction_contract/*.*
 
Reply
#2
Have you tried using a .lay file?

You have to make one for every building type (although the same file could be used by several buildings of the same size).

Found in /terrain in the tre's for reference.

You will need to point to the .lay in the object .iff in the terrainModificationFileName chunk.

Not tried it so don't know how it would cope on really uneven terrain, but it might work??

And I don't need payingSmile
 
Reply
#3
(2017-05-23, 01:22 PM)Lasko Wrote: Have you tried using a .lay file?

You have to make one for every building type (although the same file could be used by several buildings of the same size).

Found in /terrain in the tre's for reference.

You will need to point to the .lay in the object .iff in the terrainModificationFileName chunk.

Not tried it so don't know how it would cope on really uneven terrain, but it might work??

And I don't need payingSmile

Well thats the thing (and why were paying lol) atm that change you just proposed while it makes sense and will probably work, it iis completly outside of our skillset and unless it would come in like a step 1, 2,3,4 for dummies theres just no way wed know how to do it.

Since we know your time is valuable and we dont expect you to waste your time explaining extreme coding to us mere mortals we would like to pay people like you for your time to make a dedicated step by step post on how to acomplish this.

In the end, even tho wed pay for it, the entire comunity will benefit as the guide would be here, in public for everyone to see.

Were good at variable/code mods but not so good at actual game client hacks lol
 
Reply
#4
(2017-05-23, 01:22 PM)Lasko Wrote: Have you tried using a .lay file?

You have to make one for every building type (although the same file could be used by several buildings of the same size).

Found in /terrain in the tre's for reference.

You will need to point to the .lay in the object .iff in the terrainModificationFileName chunk.

Not tried it so don't know how it would cope on really uneven terrain, but it might work??

And I don't need payingSmile

Just to give you an example

1: what is a .lay file?

2: where is it found?
in /terrain in the tres

3: how does it work?

4: how do you make one?

5: what software is involved?

6: does it require special language knowledge?

7: how can i test if it worked?

8: how do i properly add it to a tre?

etc etc lol
 
Reply
#5
Updated Bounty!
 
Reply
#6
You were looking in the right place with SFP files.

Structure Footprints determine whether a building can be placed. The INFO chunk has the important information here - it's four integers followed by two floats - the floats are your tolerance for unevenness of terrain. Increase those and you're in business. In the case of this screenshot, I'm modifying the SFP for the large generic house style 01 - the normal height tolerances are 8/8. With these settings...

[Image: RsjoUon.png]

I can do this:

[Image: ggl5Xh7.jpg]

You'll need to tweak settings to get something acceptable for your use.
 
Reply
#7
Awesome!

Just to be clear....

do we need to change ANYTHING server side or is it all in in these files?

if we have to change anything in the server files what do we change?

could you attach a sample of say large generic guild hall with the modifications? just so we can edit it and see the diff vs a normal file?

If this works, you sir have claimed a bounty! Big Grin
 
Reply
#8
on an unrelated but related question

How hard would it be to modify it so that when you place a house on uneven terrain,only past a certain degree of incline, the house levels the terrain around it just like the camps do?

maybe add that bit to the structure manager code?

This with the intention of avoiding accidental "doors stuck inside cliffs" situations
 
Reply
#9
Generic guildhall footprint attached. (Note - Corellia and generic guildhalls use the same SFP file.)

And yes, that's all you need - there is no server code that needs to be altered in this case. You may need to bundle the altered SFPs in a TRE for your server, as I've never tested having different versions on the server and client.



Now, the terrain altering-files are a different beast.

Those are the .LAY files Lasko brought up upthread. As it currently stands, they cause some oddities to happen that I didn't catch until we moved to a live server with 100s of players.

Basically, .LAYs are "layers" for a planetary terrain. I don't know if anyone's spent the time I have manipulating them. From what I've been able to tell, there are two critically important things to understand about LAYs:

1.) They're either attached to a building or not, because the morph has to happen on the client. If it happens on the server only, you won't see any difference at all on your client due to how terrain is handled.

2.) The SWGEmu code doesn't properly apply .LAYs attached to building objects. Basically, the terrain is altered on your client but not on the server. I haven't looked into a fix for it yet.

Now, I can think of some very hack-ish workarounds to get a LAY to appear only on rough terrain, but it'd require writing new code I can't say I'm interested in doing at the moment. The idea I have would be to have a .LAY attached to a different object that spawns at the same coordinates as your building, but the server would only spawn said object of the terrain was "rough enough". I have no idea how well such an approach would work, and how much new code would need to be written to make it happen.


Attached Files
.zip   shared_player_guildhall_corellia_style_01.zip (Size: 293 bytes / Downloads: 2)
 
Reply
#10
ill atttempt to mod a different file using your file as a template of what to change/modify

As soon as im successful in replicating your results ill post a step by step guide on how to do it so everyone else can do it as well if they need to , and you can claim your bounty! Big Grin

One last thing just to save me hours of reverse engineering on something your probably figured out already, do you know how exactly the numbers to edit affect the angle? like right now its x but if you double it that means double or exponential or what? like say im looking for a 45 degree angle, what number would that be? its only if you know this number off the top of your head, if not ill trial an error it.

Regarding the layers file i understand what you are saying, well the idea was that it was some setting on the game that said "if x = true then level terrain around x/y center intersection point"

But the way it seems to be done seems extremely complex and honestly i do agree with you that it would require too much code to accomplish a minor upgrade

What we will do is play around with the terrain leeway a little bit, see up to whatinclination point we loose access to the door if we place it on a hill, and leave it at that point, that should take care of 99% of accidental door blocks while still allow a much wider range of placement

Thank you for your help, it has been invaluable!
 
Reply
  



Forum Jump:


Browsing: 1 Guest(s)