Jump to content

Noob Coding Questions


Recommended Posts

Posted (edited)

I am working on getting @AbdelAdrian's Bladesinger up and running in EET as the first part of an updated Eldritch Magic.  He creates a coding framework that patches (nearly) every armor and weapon in the game.  However, he missed two handed swords.  I think I know how to fix it, but my coding knowledge is so asymmetrical that I am missing basic fundamentals that I am sure are obvious to anyone attempting a mod of this complicity.  For example:

  1. When do you use BEGIN?  More fundamental, why do you need to use it?
  2. Why do some series of lines have an "END" but some do not? Like COPY or even COPY_EXISTING_REGEXP seems like it should need an "END" but doesn't from what I can see.
  3. Is there a Weidu terminal or other method to experiment with the code easily? It is cumbersome to have to completely reinstall and replay after changing just a few lines of code to get an accurate sense of any bugs.  

I just feel like I am missing something that you are doing with your mods.  Any advice is appreciated. :)

Edited by MindTyrant
Posted (edited)

1. All the BEGIN's need an END.
And you generally use them to do stuff, within other functions. Except the starts of the components which themselves are the functions, they have component name etc..

..2... The reason the COPY and COPY_EXIS... don't, is that they have a limited amount of files they run through, but it will run through all of them ... and the exact amount depends on the definitions you give during the command.

3. no not really, but there are some code syntax highlighter's for various programs. That allow you to see that the code is almost correct... you can only really test them with install .. say like: http://www.shsforums.net/topic/56349-weidu-highlighter-light-for-notepad/#entry602422 
But also, weidu itself is very informative code taker, as it's a command line tool, so if it eats code that doesn't compute, it will tell you that it doesn't like it and will error out.. in all most all the cases it ought to. And it's safe to try to install the same thing dozens of times if it fails all the other times before this current try.

Edited by Jarno Mikkola
Posted
5 hours ago, MindTyrant said:
  • When do you use BEGIN?  More fundamental, why do you need to use it?
  • Why do some series of lines have an "END" but some do not? Like COPY or even COPY_EXISTING_REGEXP seems like it should need an "END" but doesn't from what I can see.
  • Is there a Weidu terminal or other method to experiment with the code easily? It is cumbersome to have to completely reinstall and replay after changing just a few lines of code to get an accurate sense of any bugs.  

Reference the syntax section in WeiDU README (9  Module Packaging: TP2 Files) , it will tell you what syntax requires BEGIN and END. https://weidu.org/~thebigg/README-WeiDU.html

I use a dummy install to test my code.

Posted
2 hours ago, Jarno Mikkola said:

1. All the BEGIN's need an END.

No. In a tp2, the BEGIN that marks the actual mod content (or component content) doesn't get an END. In a d-file, a dlg defined by BEGIN doesn't get an END.

Posted (edited)
1 hour ago, jastey said:

No. In a tp2, the BEGIN that marks the actual mod content (or component content) doesn't get an END. In a d-file, a dlg defined by BEGIN doesn't get an END.

You do know you cut off that quote ...
And yes you are right that defining the .dlg file needs an BEGIN and it doesn't end in an END(technically), but the rest of the files content does gets an END, for each of the BEGIN:ings.
And unless you want to involve the inlining too, and explain that the tp2 commands no longer work inside that, but do other wise, and the TP2 commands are differenmt from the .d coding, then fine, but that's deeper than just the surface coding I was generalizing.

 

3 hours ago, WanderingScholar said:

Reference the syntax section in WeiDU README (9  Module Packaging: TP2 Files) , it will tell you what syntax requires BEGIN and END. https://weidu.org/~thebigg/README-WeiDU.html

You do know you could direct to this address instead, as the readme has structure: https://weidu.org/~thebigg/README-WeiDU.html#TP2 . And it also has content table, so you can get the links more easily.

Edited by Jarno Mikkola

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...