the_dude_abides
Member
I'm trying to make a text editor so that I can clean up messy scripts, and object events. I've already seen someones asset to do this in a windows environment, but want to make mine work solely in GML (albeit with some extensions)
Currently I have scripts / object details exported as text, and those are stored in the included files. The aim is to edit them, and then be able to reinsert them into the original location.
I'd like that to be fairly automatic - which isn't a problem as of now for saving them in the included files. I also know what directory scripts are in, and they seem to only be a text file with a modified GMS type. No idea yet whether scripts can be edited like this, but that's not the issue.
I'm unsure where the original files (where GMS itself defines the actual game data, and compiles from) are stored for objects. When you use "show information" (in the object properties window) it generates a file that can then be saved. Ideally I want to edit that result and put it back to where it was generated from.
Ignoring for now whether this is sensible to edit them (I'll assume it's not advisable editing data it's trying to run as an executable) does anyone know the game data location for objects events, and what the file is called?
I opened an object with Visual Studio and can see that it does have code that's readable, but, er, am not at all versed in Visual Studio.....is all the information that GMS reads stored there? (it looks like it is, but I wouldn't have a clue as to how it functions)
I get the same text as above if I open a GML object in notepad, but I haven't a clue what the format is, or where it refers to any data.
So is it just a pointer of some kind to another area? And, if so, where - and can it be accessed?
@Nocturne @TsukaYuriko @Yal
My apologies if this isn't the correct way to do this, but having posted this in 'programming' it occurred to me it might get a better response in the advanced section. I do have access to post there - would it be possible to get it moved? Thanks
Currently I have scripts / object details exported as text, and those are stored in the included files. The aim is to edit them, and then be able to reinsert them into the original location.
I'd like that to be fairly automatic - which isn't a problem as of now for saving them in the included files. I also know what directory scripts are in, and they seem to only be a text file with a modified GMS type. No idea yet whether scripts can be edited like this, but that's not the issue.
I'm unsure where the original files (where GMS itself defines the actual game data, and compiles from) are stored for objects. When you use "show information" (in the object properties window) it generates a file that can then be saved. Ideally I want to edit that result and put it back to where it was generated from.
Ignoring for now whether this is sensible to edit them (I'll assume it's not advisable editing data it's trying to run as an executable) does anyone know the game data location for objects events, and what the file is called?
I opened an object with Visual Studio and can see that it does have code that's readable, but, er, am not at all versed in Visual Studio.....is all the information that GMS reads stored there? (it looks like it is, but I wouldn't have a clue as to how it functions)
Code:
<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
<spriteName><undefined></spriteName>
<solid>0</solid>
<visible>-1</visible>
<depth>0</depth>
<persistent>0</persistent>
<parentName><undefined></parentName>
<maskName><undefined></maskName>
<events>
<event eventtype="8" enumb="73">
<action>
<libid>1</libid>
<id>603</id>
<kind>7</kind>
<userelative>0</userelative>
<isquestion>0</isquestion>
<useapplyto>-1</useapplyto>
<exetype>2</exetype>
<functionname></functionname>
<codestring></codestring>
<whoName>self</whoName>
<relative>0</relative>
<isnot>0</isnot>
<arguments>
<argument>
<kind>1</kind>
<string>draw_circle(x, y, 50, false);
</string>
</argument>
</arguments>
</action>
</event>
</events>
<PhysicsObject>0</PhysicsObject>
<PhysicsObjectSensor>0</PhysicsObjectSensor>
<PhysicsObjectShape>0</PhysicsObjectShape>
<PhysicsObjectDensity>0.5</PhysicsObjectDensity>
<PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
<PhysicsObjectGroup>0</PhysicsObjectGroup>
<PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
<PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
<PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
<PhysicsObjectAwake>-1</PhysicsObjectAwake>
<PhysicsObjectKinematic>0</PhysicsObjectKinematic>
<PhysicsShapePoints/>
</object>
So is it just a pointer of some kind to another area? And, if so, where - and can it be accessed?
@Nocturne @TsukaYuriko @Yal
My apologies if this isn't the correct way to do this, but having posted this in 'programming' it occurred to me it might get a better response in the advanced section. I do have access to post there - would it be possible to get it moved? Thanks
Last edited: