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.
[11:13 pm]
Suicidal Insanity -- There was a blue post to that effect, why would it be silly?
[08:37 pm]
NudeRaider -- Suicidal Insanity
Suicidal Insanity shouted: to do with the fact that macos is phasing out 32bit support
that would be silly but might still be true
[08:33 pm]
jjf28 -- there was a neat trick in 1.16.1 with the sprite structure... though it's not in SC:R
[07:43 pm]
Zoan -- I'll try it when I get home
[07:30 pm]
Zoan -- anyone know how to make selection persist through walking in fog of war with eud's? http://www.staredit.net/topic/7729/unread/#special
[02:17 pm]
Suicidal Insanity -- to do with the fact that macos is phasing out 32bit support
[02:17 pm]
Suicidal Insanity -- NudeRaider
NudeRaider shouted: The changes are all "under the hood" main reason for 64 bit is access to more than ~3.5GB RAM. Probably not relevant to Starcraft though.
it may, just maybe, just a littgle, havet
[2019-10-22. : 5:07 am]
NudeRaider -- Ultraviolet
Ultraviolet shouted: NudeRaider <3
even though I clearly put no effort into those arrows? :P
[2019-10-22. : 5:06 am]
NudeRaider -- http://i.snipboard.io/k3C9O2.jpg ... because all the main characters suffocated during this scene
Please log in to shout.


Members Online: Owse2, Roy, kadygimlume703