Staredit Network > Forums > SC1 Mapping Tools > Topic: Python tool to parse SCMDraft triggers into objects/OOP represen
Python tool to parse SCMDraft triggers into objects/OOP represen
Dec 30 2018, 4:17 pm
By: sethmachine  

Dec 30 2018, 4:17 pm sethmachine Post #1



Hi,

Is there an existing Python library that will take as input the raw trigger strings from SCMDraft and parse each trigger into different object representations, e.g. a Trigger should have a list of conditions, list of actions, etc. There would be a sublcass of Trigger_Action for each action, like Set Deaths, which would have fields/methods to set the different parameters: "Set Deaths("Player 8", "Alan Turret", Set To, 0);", e.g. there might be a .player field, a .unit field, etc.

Nice to have would also be automatic compilation and checking of trigger format inside Python, rather than copy-pasting into SCMDraft and then getting a notification.

If I'm not being clear, I will provide a Python example showing what I mean.



None.

Dec 30 2018, 4:25 pm Suicidal Insanity Post #2

I see you !

Wouldn't it make more sense to parse the binary triggers? Or is that too much overhead with the various required datafiles and string table / switch table / location table?




Dec 30 2018, 6:22 pm poiuy_qwert Post #3

PyMS and ProTRG developer

I don't think there is a tool that does exactly what you are looking for, but there are some other options you could look into. I put a more detailed reply of the options in your other thread: http://www.staredit.net/370906/




Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[09:21 pm]
Suicidal Insanity -- I ran a duplicate file find tool on my photo drive - it claims 125k potential duplicates based on file size. I wonder if that is just the .XMP files or actual photos. Probably should have excluded XMP now that I think about it.
[05:54 pm]
O)FaRTy1billion[MM] -- :wob:
[05:54 pm]
MasterJohnny -- :wob:
[2019-5-18. : 5:21 am]
KrayZee -- no
[2019-5-18. : 1:19 am]
Pr0nogo -- u
[2019-5-17. : 11:04 pm]
lil-Inferno -- mostly younger ass these days
[2019-5-17. : 11:04 pm]
Sacrieur -- hopefully not too much grown ass
[2019-5-17. : 11:04 pm]
lil-Inferno -- grown and ass and man
[2019-5-17. : 11:03 pm]
Sacrieur -- how are ya
[2019-5-17. : 11:03 pm]
lil-Inferno -- grown-ass man now tbh
Please log in to shout.


Members Online: Roy, Karlsse7, Neiv