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.
[01:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[10:11 pm]
Ultraviolet -- :P
[10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- if i don't gamble them away first
[2024-4-17. : 11:49 pm]
O)FaRTy1billion[MM] -- o, due to a donation i now have enough minerals to send you minerals
[2024-4-17. : 3:26 am]
O)FaRTy1billion[MM] -- i have to ask for minerals first tho cuz i don't have enough to send
[2024-4-17. : 1:53 am]
Vrael -- bet u'll ask for my minerals first and then just send me some lousy vespene gas instead
[2024-4-17. : 1:52 am]
Vrael -- hah do you think I was born yesterday?
Please log in to shout.


Members Online: Frabotta