Change object state?

Place for sharing your game modifications for Life is Feudal: Your Own

Alakar
Beta Tester
 
Posts: 202
Joined: 23 Jan 2015, 07:39

Change object state?

Post by Alakar » 26 Feb 2015, 01:04

Okay I know about the ClientGroup in the server but is there something for the game world objects in there too? Been trying to dig around and find them but no luck yet on what Group they might be a part of. Basically what I am looking at is trying to change the state of objects from the server (ie: turn on the floor lamps, they look cool when they are on). Any ideas would be helpful, Thank you!


Remystemple
 
Posts: 80
Joined: 15 Jan 2015, 22:30

Re: Change object state?

Post by Remystemple » 26 Feb 2015, 04:24

i tried to copy the lighting data from the lamp post over to the floor lamp with no success , would love to force them to work too. the best i could do was make lamp post movable as to bring them inside. good enough for now i guess.


Alakar
Beta Tester
 
Posts: 202
Joined: 23 Jan 2015, 07:39

Re: Change object state?

Post by Alakar » 26 Feb 2015, 06:05

Remystemple wrote:i tried to copy the lighting data from the lamp post over to the floor lamp with no success , would love to force them to work too. the best i could do was make lamp post movable as to bring them inside. good enough for now i guess.


Well I have forced them to work client-side by Copying the Working state information over the Complete, also interesting to see Damaged state on objects. I turned on the floor lamps and windmills on my client, looks kind of cool I believe. Though the windmill is very loud.

[youtube]bap3lTYKYYI[/youtube]


Remystemple
 
Posts: 80
Joined: 15 Jan 2015, 22:30

Re: Change object state?

Post by Remystemple » 26 Feb 2015, 07:13

omg that's awesome. could you please tell how you did it? i've been modding my butt off and this is pretty damn cool. but have no clue how you did it. good work : )


Alakar
Beta Tester
 
Posts: 202
Joined: 23 Jan 2015, 07:39

Re: Change object state?

Post by Alakar » 26 Feb 2015, 07:36

Remystemple wrote:omg that's awesome. could you please tell how you did it? i've been modding my butt off and this is pretty damn cool. but have no clue how you did it. good work : )

its actually quite simple, the devs already had the animation and such done so all you have to do is open your cm_objects.xml file and go to windmill
Code: Select all
    <object id="137" isUnflattenAllowed="0" rotationStep="1" defaultState="Complete" StreamingGroup="3">
go down a few lines from that and you should see
Code: Select all
                <shapes>
                    <shape>
                        <shapeName>art/Models/3D/Construction/MassProcessing/Windmill/windmill.dts</shapeName>
                        <offset x="4.57424" y="4.73604" z="3.8147e-006" />
                        <rot x="0" y="0" z="1" angle="0" />
                        <scale x="1" y="1" z="1" />
                    </shape>
                </shapes>

add the following into it
Code: Select all
                        <animationName>work</animationName>                  


so it looks like
Code: Select all
            <state type="Complete">
                <shapes>
                    <shape>
                        <shapeName>art/Models/3D/Construction/MassProcessing/Windmill/windmill.dts</shapeName>
                        <animationName>work</animationName>                  
                        <offset x="4.57424" y="4.73604" z="3.8147e-006" />
                        <rot x="0" y="0" z="1" angle="0" />
                        <scale x="1" y="1" z="1" />
                    </shape>
                </shapes>


Remystemple
 
Posts: 80
Joined: 15 Jan 2015, 22:30

Re: Change object state?

Post by Remystemple » 26 Feb 2015, 09:08

Thank you. pretty damn awesome. some strange things happened tho. got the windmill working , but did the same with the floor lamp it didn't light up and i crash every time i interact with it. but awesome work man. this is a great new step in modding for LIF. way to go : )


Alakar
Beta Tester
 
Posts: 202
Joined: 23 Jan 2015, 07:39

Re: Change object state?

Post by Alakar » 26 Feb 2015, 09:11

Oh that's because the floor lamp is not an animation but just some effects added over the top of it. If you look at the floor lamp and copy everything from the working state over the complete state it will be always on.


Remystemple
 
Posts: 80
Joined: 15 Jan 2015, 22:30

Re: Change object state?

Post by Remystemple » 26 Feb 2015, 09:15

amazing man. i'm stoked. next up sawmill.. lol

thanks a lot. keep modding dude


Alakar
Beta Tester
 
Posts: 202
Joined: 23 Jan 2015, 07:39

Re: Change object state?

Post by Alakar » 26 Feb 2015, 09:46

Remystemple wrote:amazing man. i'm stoked. next up sawmill.. lol

thanks a lot. keep modding dude


sawmill doesn't run on a loop... :cry:


Remystemple
 
Posts: 80
Joined: 15 Jan 2015, 22:30

Re: Change object state?

Post by Remystemple » 26 Feb 2015, 10:07

that's ok. it would look pretty stupid with out a river to put it in. lol
also i have to wonder why the devs didn't put this in already. like wtf? how about torches. think you could do it before them? i do. lol


Aranax
 
Posts: 12
Joined: 25 Sep 2014, 05:40

Re: Change object state?

Post by Aranax » 14 Apr 2015, 11:59

Thanks for this bro, just tried it out and looks awesome! Thanks again! :D
Image

Return to Game mods