|
Post by pixaratv on May 29, 2019 12:02:50 GMT -5
Hello! I am creating an object with so far two geometry states. For better understanding I experiment with a trash can. So I started with two existing states (Upright, KnockedOver). I set 'KnockedOver' as default and I was able to change a 'KnockedOver' trash can (via 'Pick up' interaction) to state 'upright' ingame.
So I made a custom interaction for 'Pick up' which also worked out. But when I make a custom object state (only changing the instance of an existing object state tuning), the object do not show up ingame. Instead I get the 'Script Call Fail' message.
How can I solve this problem? It should be possible to create a custom object state, right?
|
|
|
Post by pixaratv on May 29, 2019 12:29:12 GMT -5
Solved. I forgot to list my object states in the main 'ObjectState'-tuning in '_values'.
|
|
|
Post by c821118 on Jul 11, 2019 6:12:50 GMT -5
Hi pixaratv I've got the same issue with my custom object. I also got error in game when I added custom object states in state_triggers and states. But I don't understand "the main 'ObjectState'-tuning in '_values". Do you mind if I ask you a tutorial about how to solve this problem? Thank you!
|
|
|
Post by pixaratv on Jul 11, 2019 8:32:08 GMT -5
Hi! I will demonstrate it with the trashcan (outdoor).
<I c="ObjectStateValue" i="object_state" m="objects.components.state" n="Trashcan_Outdoor_Upright" s="15356"> <U n="new_client_state"> <V n="geometry_state" t="apply_new_value"> <V n="apply_new_value" t="set_to_custom_value"> <T n="set_to_custom_value">Upright</T> </V> </V> </U> <V n="value" t="boolean" /> </I>
This is the code for a trashcan being in a normal state (default). It is an "ObjectStateValue"-Tuning. Tuning ID: 15356 (Trashcan_Outdoor_Upright) This tuning can be used as a template. Just change "Upright" to something else like "Custom1" and change the instance, in order to make it a custom tuning. Just create as many object states as you wish.
<I c="ObjectState" i="object_state" m="objects.components.state" n="Trashcan_Outdoor_State" s="15355"> <L n="_values"> <T>15354<!--Trashcan_Outdoor_Knocked_Over--></T> <T>15356<!--Trashcan_Outdoor_Upright--></T> </L> </I>
Tuning ID: 15355 (Trashcan_Outdoor_State) This is the main tuning. It is the "ObjectState"-tuning. It is a list of your custom states. But only for these, which belong to a group. For example, state "Upright" and "KnockedOver" belong to a group, but the "Trash_Rummagable_CanRummage"-state is not part of the group. Exampel: If you want to have a "normal" and "broken" object, it does not make sense to add another state like "in use" to the tuning too. For this you create a new "object_state"-tuning with the _values "in use" and "not in use" (after you have created two new custom states, which you add to the list).
This is all you need for your custom state to work. All you have to do now is to insert the states into the object tuning file. I do not know how "state_triggers" work. I only use the "client_states".
<L n="states"> <U> <L n="client_states"> <U> <T n="key">15354<!--Trashcan_Outdoor_Knocked_Over--></T> </U> <U> <T n="key">15356<!--Trashcan_Outdoor_Upright--></T> </U> </L> <V n="default_value" t="reference"> <T n="reference">15356<!--Trashcan_Outdoor_Upright--></T> </V> </U> </L>
You just replace the keys with your custom states and set the new default state.
I hope I could help you!
|
|
|
Post by jimbooo on Jul 11, 2019 17:53:43 GMT -5
Hi there I'm Jim I was trying to install the sims 4 installer but it say it might harm my pc, what Im trying to do is be able to put my doors in my houses and stuff. will this sims 4 install help me get rid of the script call failer
|
|
|
Post by c821118 on Jul 12, 2019 2:08:52 GMT -5
Hi pixaratvTHANK YOU SO MUCH!! It did solve my problem!! Before I read your tutorial, I didn't know you have to list ObjectStateValue in ObjectState to make them work. I injected my custom ObjectStateValues into a custom ObjectState-tuning and added them in client_states and state_triggers. It works fine and no errors. Thank you! :D
|
|
|
Post by pixaratv on Jul 12, 2019 10:17:07 GMT -5
c821118I am glad that I could help you Hello jimbooo1.) What do you mean by "The Sims 4 Installer"? Don't you mean the "sims4studio" installer? 2.) The "harming"-message is normal. Just ignore that. 3.) What do you mean by "be able to put my doors in my houses and stuff"? 4.) Please state more precisely when the Script Call Failure occurs.
|
|
|
Post by ravasheen on Sept 4, 2020 3:17:28 GMT -5
pixaratv i am trying to add custom geometry states to something and hoping you can help with your infinate wisdom. you said "Just change "Upright" to something else like "Custom1" and change the instance, in order to make it a custom tuning. Just create as many object states as you wish." but how do you relate that name to the tuning file or to the geometry states in the LOD resources? i try changing the names in the lod resources and it just defaults to the hex value, not the actual name. thanks!
|
|
|
Post by pixaratv on Oct 21, 2020 8:12:38 GMT -5
pixaratv i am trying to add custom geometry states to something and hoping you can help with your infinate wisdom. you said "Just change "Upright" to something else like "Custom1" and change the instance, in order to make it a custom tuning. Just create as many object states as you wish." but how do you relate that name to the tuning file or to the geometry states in the LOD resources? i try changing the names in the lod resources and it just defaults to the hex value, not the actual name. thanks! Hey ravasheen, it actually doesn't matter at all which names you take. You can still use the default state names, as long as they differ from one another (like default, broken, unbroken, open, closed). I suggest using the default EA names, because you can not add actual letters to the LOD resources (only hex). I do not know about you, but I find hex numbers really confusing. Therefore, it is easier to use something that is already exists like "Upright" and "Knocked Over". Nobody will notice it ingame. It is only visible for modder.
|
|
|
Post by ravasheen on Oct 22, 2020 3:36:36 GMT -5
pixaratv i am trying to add custom geometry states to something and hoping you can help with your infinate wisdom. you said "Just change "Upright" to something else like "Custom1" and change the instance, in order to make it a custom tuning. Just create as many object states as you wish." but how do you relate that name to the tuning file or to the geometry states in the LOD resources? i try changing the names in the lod resources and it just defaults to the hex value, not the actual name. thanks! Hey ravasheen , it actually doesn't matter at all which names you take. You can still use the default state names, as long as they differ from one another (like default, broken, unbroken, open, closed). I suggest using the default EA names, because you can not add actual letters to the LOD resources (only hex). I do not know about you, but I find hex numbers really confusing. Therefore, it is easier to use something that is already exists like "Upright" and "Knocked Over". Nobody will notice it ingame. It is only visible for modder. oh wow thank you for getting back to me! it didnt seem like you were active anymore so i didnt think you would respond. since i wrote that, i have learned alottttt about geostates. mostly that they are a pain in the ___ but also very powerful. this is what i ended up using it for: http://instagram.com/p/CGA2AblJCiq i left the names as they were from the object i cloned. isnt as clean but it works!
|
|
|
Post by pixaratv on Oct 26, 2020 3:10:57 GMT -5
Hey ravasheen , it actually doesn't matter at all which names you take. You can still use the default state names, as long as they differ from one another (like default, broken, unbroken, open, closed). I suggest using the default EA names, because you can not add actual letters to the LOD resources (only hex). I do not know about you, but I find hex numbers really confusing. Therefore, it is easier to use something that is already exists like "Upright" and "Knocked Over". Nobody will notice it ingame. It is only visible for modder. oh wow thank you for getting back to me! it didnt seem like you were active anymore so i didnt think you would respond. since i wrote that, i have learned alottttt about geostates. mostly that they are a pain in the ___ but also very powerful. this is what i ended up using it for: i left the names as they were from the object i cloned. isnt as clean but it works! Hi ravasheen, wow, that is incredible. It is so creative and complex. I will definitely check it out. Do you have a tumblr post about your creation I could reblog?
|
|
|
Post by ravasheen on Oct 28, 2020 3:02:44 GMT -5
oh wow thank you for getting back to me! it didnt seem like you were active anymore so i didnt think you would respond. since i wrote that, i have learned alottttt about geostates. mostly that they are a pain in the ___ but also very powerful. this is what i ended up using it for: i left the names as they were from the object i cloned. isnt as clean but it works! Hi ravasheen , wow, that is incredible. It is so creative and complex. I will definitely check it out. Do you have a tumblr post about your creation I could reblog? thank you! took me forever to figure out how to do it right and i redid my approach several times. here is the tumblr post: ravasheencc.tumblr.com/post/631250688180125696/shop-chef-buffet-table-i-have-been-working-onwould you send me a message on there so i can give you a follow back?
|
|
|
Post by ChippedSim on Oct 29, 2020 2:54:19 GMT -5
Hey I'm actually having a similar problem. I'm trying to create a functional water bowl for pets. I tried adding another group to the pet food bowl to add the water shader but it doesn't let me import the mesh correctly (the water group just dissapears on import even though the cut numbers match). So I tried to clone the base game bird bath and add the pet bowl Geostates to it but now I get a script error. I also added the object tuning of the pet bowl so the number or states matches the object tuning. Does anyone know why this is happening? See error message in the spoiler below: {Spoiler}The Sims 4 Studio - Version 3.1.3.6 System.AggregateException: Mindestens ein Fehler ist aufgetreten. ---> S4Studio.Blender.BlenderException: File "<string>", line 1, in <module> File "C:\ProgramData\S4Studio\Scripts\objectexporter.py", line 14, in <module> save_lod(mlod,geometry_state) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\blender.py", line 393, in save_lod save_mesh(blender_mesh, m, new_mesh, geometry_state) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\blender.py", line 268, in save_mesh vertices = s4mesh_orig.get_vertices(old_state.state) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\geometry.py", line 294, in get_vertices uvscales) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\geometry.py", line 645, in read_vertices a.append(self.read_vertex(vrtf, uvscales)) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\geometry.py", line 670, in read_vertex value = self.read_element(declaration, uvscales) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\geometry.py", line 815, in read_element shorts = [self.reader.i16() for i in range(3)] File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\geometry.py", line 815, in <listcomp> shorts = [self.reader.i16() for i in range(3)] File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\io.py", line 70, in i16 return self.i(16, order) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\io.py", line 54, in i elif size == 16: return self.read('h', 2, order) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\io.py", line 30, in read l = struct.unpack(order + l, d)[0] struct.error: unpack requires a bytes object of length 2
bei S4Studio.Blender.BlenderUtilities.RunBlender(String script, String blend, Boolean background, Boolean check_version) bei S4Studio.Blender.BlenderUtilities.ImportMlod(String fileName, String mlod, String rig, String state) bei S4Studio.ViewModels.ObjectLodItem.ImportMesh(BlenderUtilities blender_util, String blender_path) bei S4Studio.ViewModels.ObjectLodItem.<>c__DisplayClass49_0.<ImportMesh>b__0() bei System.Threading.Tasks.Task.InnerInvoke() bei System.Threading.Tasks.Task.Execute() --- Ende der internen Ausnahmestapelüberwachung --- ---> (Interne Ausnahme #0) S4Studio.Blender.BlenderException: File "<string>", line 1, in <module> File "C:\ProgramData\S4Studio\Scripts\objectexporter.py", line 14, in <module> save_lod(mlod,geometry_state) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\blender.py", line 393, in save_lod save_mesh(blender_mesh, m, new_mesh, geometry_state) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\blender.py", line 268, in save_mesh vertices = s4mesh_orig.get_vertices(old_state.state) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\geometry.py", line 294, in get_vertices uvscales) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\geometry.py", line 645, in read_vertices a.append(self.read_vertex(vrtf, uvscales)) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\geometry.py", line 670, in read_vertex value = self.read_element(declaration, uvscales) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\geometry.py", line 815, in read_element shorts = [self.reader.i16() for i in range(3)] File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\buybuild\geometry.py", line 815, in <listcomp> shorts = [self.reader.i16() for i in range(3)] File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\io.py", line 70, in i16 return self.i(16, order) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\io.py", line 54, in i elif size == 16: return self.read('h', 2, order) File "C:\Users\[UserName]\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\s4studio\io.py", line 30, in read l = struct.unpack(order + l, d)[0] struct.error: unpack requires a bytes object of length 2
bei S4Studio.Blender.BlenderUtilities.RunBlender(String script, String blend, Boolean background, Boolean check_version) bei S4Studio.Blender.BlenderUtilities.ImportMlod(String fileName, String mlod, String rig, String state) bei S4Studio.ViewModels.ObjectLodItem.ImportMesh(BlenderUtilities blender_util, String blender_path) bei S4Studio.ViewModels.ObjectLodItem.<>c__DisplayClass49_0.<ImportMesh>b__0() bei System.Threading.Tasks.Task.InnerInvoke() bei System.Threading.Tasks.Task.Execute()<---
|
|