Changing altitude/offset for placed models

Place for sharing your game modifications for Life is Feudal: Your Own
User avatar
Leaf
 
Posts: 76
Joined: 01 Feb 2014, 16:47

Changing altitude/offset for placed models

Post by Leaf » 17 Jan 2019, 08:45

GM placing things is messy of course. But sometimes you don't have the option to flatten/start construction/complete. Or you want to have a building partially clip into a hill, make it lower than it should be, get piers to line up, etc.

Knowing that 0 is the center of the world far under the map, and 5,000 is the water level of 0.0 I made a model, went into the database and found it, changed the altitude from Null to 5050, restarted the server. I figured that would specify where the base of the model was at and I could go from there to finetuning the exact height I wanted.

Whoops. Stuck on 8/9 loading.... Connecttoserver command wouldn't fix it. Okay, shut down and delete the object. Still have a broken server, so just reinstalling the map and textures and making a new navmesh for lack of a better option I can think of.

But is there a proper way to play with altitude/offsets? Does building in water make a difference? Tips welcomed. :D

User avatar
Nyuton
Mod Developer
 
Posts: 51
Joined: 01 Feb 2017, 10:51
Location: Berlin

Re: Changing altitude/offset for placed models

Post by Nyuton » 17 Jan 2019, 16:21

Unmovable objects (buildings) always snap to the terrain surface. That's why they have no altitude value in the database. You can't change that from the DB.

You can change the altitude of all movable objects to make them float or to sink them into the ground, but you'll have to change it in both objects_patch and movable_objects table.
My Blog | Custom Maps & Tools for LiF:YO server owners on FeudalTools

User avatar
Leaf
 
Posts: 76
Joined: 01 Feb 2014, 16:47

Re: Changing altitude/offset for placed models

Post by Leaf » 17 Jan 2019, 18:10

Thank you.

And from what I've read changing something to a movable object, placing it, changing it back to an unmovable object deletes them all next time the database updates.

Guess i'll be using your terrain editor at feudal tools to do this instead. =)

Although... if I take something like a stone wall, change it to movable, give it a weight of 1,000,000 so only a GM can pick it up, change my client file to show it as movable also.... that could work. No client mod needed for players and I *think* that since their files still show it as unmovable they won't get the option to pick it up, so no verifying with the server files which would cause a mismatch and probable glitch, so no inconsistency for them. And that might give me xyz and rotation power over it without messing with the database. (Yeah, I talk my way through stuff and others might search for a fix later and find this)

Excellent suggestion sir, thank you.

User avatar
Leaf
 
Posts: 76
Joined: 01 Feb 2014, 16:47

Re: Changing altitude/offset for placed models

Post by Leaf » 22 Jan 2019, 22:51

I'm having trouble with a basic noob thing and if I can't get this to work, I probably have no business even trying. Been fighting this for a week and at the end of my rope, i know converting models to dts using old versions of blender will be even harder. The forums are pretty much dead, seems dts conversion isn't really supported anymore, and the game is just too old/torque isn't liked very much.

Change an object from unmovable to movable. Simple, yes?

Stop server. Change client folder object_types.xml for object 1076, pier, so that movable is 1 and unmovable is 0. Save.

Go into Filezilla, confirm only file with pier in it anywhere is data/cm_objects.xml and that just points to marker for when it is under construction, damage, etc.

Open Heidisql. Go into (for me) lif8 object_types to line 1076 and change to movable 1 unmovable 0. Refresh, changes stay.

Start server. Heidi file reverts back. Make changes again and post. Changes stay, reverts back on server start.

Okay... I change all 1076 objects in objects_patch file from unmovable to movable. THOSE changes stay. Object_types reverts back to original. Server won't come up.

Movable_objects table is empty. Unmovable_objects table is empty. Geo_patch is nothing but terrain rows going up to around 1,000.

All the clues I can find over the last week.

make-unmovable-movable-t10547/

change-object-state-t11941/

https://steamcommunity.com/app/290080/d ... 411765969/


WARN 2019-01-22 22:27:54.042 {02} [0] DB::noRS(0 ms) COMMIT;
ERRR 2019-01-22 22:27:54.042 {02} [0] [line #5887] CmChangeStore::_scanObjectsChanges_db() - invalid change
ERRR 2019-01-22 22:27:54.042 {02} [0] [line #5459] CmChangeStore::_loadDbChanges() - can't scan db changes
ERRR 2019-01-22 22:27:54.042 {02} [0] [line #4545] CmChangeStore::init() - can't read all patches from db(terid=445)
ERRR 2019-01-22 22:27:54.042 {02} [0] [line #337] CmPatcher::attachTerrain() - can't init CmChangeStore class. terID=445
INFO 2019-01-22 22:27:54.042 {02} [0] CmPatcher::detachTerrain(445) -- removing previous store!
ERRR 2019-01-22 22:27:54.042 {02} [0] [line #6133] TerrainDeformer::_attachTerrain() - can't register terrain#445 within patcher
ERRR 2019-01-22 22:27:54.042 {02} [0] Fatal: Can't init terrain list (mirror path=""). Terminating.
ERRR 2019-01-22 22:27:54.042 {03} [0] Quit requested!!!
ERRR 2019-01-22 22:27:54.042 {03} [0] Shutting down!!!
ECHO 2019-01-22 22:27:54.042 {05} [0] *** ENDING MISSION
ERRR 2019-01-22 22:27:54.042 {05} [0] endGame: No game running!
WARN 2019-01-22 22:27:54.159 {05} [0] BtWorld::~BtWorld()
ECHO 2019-01-22 22:27:54.162 {04} [0] TerrainBlock deleted!, id = 445
ECHO 2019-01-22 22:27:54.167 {04} [0] TerrainBlock deleted!, id = 444
ECHO 2019-01-22 22:27:54.169 {04} [0] TerrainBlock deleted!, id = 443
ECHO 2019-01-22 22:27:54.172 {04} [0] TerrainBlock deleted!, id = 442
ECHO 2019-01-22 22:27:54.175 {} [0] TerrainFile deleted!, id = 445
ECHO 2019-01-22 22:27:54.177 {} [0] TerrainFile deleted!, id = 444
ECHO 2019-01-22 22:27:54.179 {} [0] TerrainFile deleted!, id = 443
ECHO 2019-01-22 22:27:54.181 {} [0] TerrainFile deleted!, id = 442
ERRR 2019-01-22 22:27:54.183 {01} [0] Quit requested!!!
INFO 2019-01-22 22:27:54.183 {01} [0] Final shutdown initiated!
ECHO 2019-01-22 22:27:54.184 {} [0] Thread pool initialized, threads: 7
WARN 2019-01-22 22:27:54.184 {} [0] Warning - Last tick took 8300 (>64) ms!
INFO 2019-01-22 22:27:54.186 {01} [1] The server has been shut down!
ECHO 2019-01-22 22:27:54.186 {} [] Thread worker terminated [T:WorkerThread6:30016]
ECHO 2019-01-22 22:27:54.186 {} [] Thread worker terminated [T:WorkerThread5:22840]
ECHO 2019-01-22 22:27:54.186 {} [] Thread worker terminated [T:WorkerThread4:5604]
ECHO 2019-01-22 22:27:54.186 {} [] Thread worker terminated [T:WorkerThread3:7256]
ECHO 2019-01-22 22:27:54.186 {} [] Thread worker terminated [T:WorkerThread0:17112]
ECHO 2019-01-22 22:27:54.186 {} [] Thread worker terminated [T:WorkerThread2:27224]
ECHO 2019-01-22 22:27:54.186 {} [] Thread worker terminated [T:WorkerThread1:17784]
ECHO 2019-01-22 22:27:54.186 {} [1] Thread pool shut down
Last edited by Leaf on 23 Jan 2019, 01:52, edited 2 times in total.

User avatar
Nyuton
Mod Developer
 
Posts: 51
Joined: 01 Feb 2017, 10:51
Location: Berlin

Re: Changing altitude/offset for placed models

Post by Nyuton » 23 Jan 2019, 00:57

Change an object from unmovable to movable. Simple, yes?
Not at all. Not anymore.

Since yo 1.4.x patch (from mid to late 2018 I think) the way movable objects work has changed. Take a look at how the original movables in object_types.xml and cm_objects.xml work. Each movable has two records. One is the old-style type and then there's a new one based on ParentID 1902, which is "Movable Objects (items)". These two are then "connected" through the database objects_conversions table. So if you need to add movables, you have to adjust to this "new style".

Are you using some gameserver hoster? The problems you describe make me believe that some mechanics at your gameserver hoster mess up your server cause you're doing stuff and changing files you're not supposed to. If you want to do modding, better try it on a dedicated machine where you have full control over the OS.
My Blog | Custom Maps & Tools for LiF:YO server owners on FeudalTools

User avatar
Leaf
 
Posts: 76
Joined: 01 Feb 2014, 16:47

Re: Changing altitude/offset for placed models

Post by Leaf » 23 Jan 2019, 01:47

Yes, hosted on bluefang. I did see some changes to files that I vaguely don't remember being there in 2014 when I ran a server before. I had the feeling it was looking at some file somewhere that was overriding my changes on startup I didn't know about, I'll poke around parent IDs which I honestly should have known to change anyhow no matter what, a movable object can't have an entry that points to a parent entry that is for static unmovables.

That object conversions table doesn't make sense to me upon looking at it though - it doesn't seem to correspond to IDs for groups, the ID1 and ID2 linking don't make any sense and has huge gaps in the numbering.


Thank you, I couldn't figure out what I was doing wrong. I'll poke around that a bit but 50/50 i'll just give up and make a vanilla server or go to a different game at this point. This should have been one of the easy things to do.

Return to Game mods

cron