Jump to content

A Course in WEIDU


Recommended Posts

On 6/7/2022 at 5:09 PM, argent77 said:

Another peculiarity involves the end-of-line character $. The symbol matches only Unix-style line breaks. To include support for the (more common) Windows-style line breaks, you have to add %MNL% as an optional match (e.g. "Minsc%MNL%?$").

Just to clarify: you meant %WNL%?$ instead of %MNL%?$, right...?

Link to comment

I've just updated this course to version 1.1. Changelog:

  • Moved to HTML.
  • New chapter on advanced techniques (immutability, encapsulation, optmization).
  • New section on error handling.
  • New section on mod component structure.
  • New section on the APPEND function.
  • Variable section discusses scope.
  • Function section discusses macros.
  • New appendix that explains what's where in the official WEIDU readme.

Link here.

Link to comment

Please do not hate me, but technically speaking, the macro set_spell_vars should look like this:

Spoiler
DEFINE_ACTION_MACRO set_spell_vars
BEGIN
	LOCAL_SPRINT spell_name ""
	LOCAL_SPRINT spell_res ""
	LOCAL_SPRINT SOURCE_DIRECTORY ""
	LOCAL_SPRINT SOURCE_FILESPEC ""
	LOCAL_SPRINT SOURCE_FILE ""
	LOCAL_SPRINT SOURCE_RES ""
	LOCAL_SPRINT SOURCE_EXT ""
	LOCAL_SET SOURCE_SIZE = 0
	LOCAL_SPRINT DEST_DIRECTORY ""
	LOCAL_SPRINT DEST_FILESPEC ""
	LOCAL_SPRINT DEST_FILE ""
	LOCAL_SPRINT DEST_RES ""
	LOCAL_SPRINT DEST_EXT ""
	//
	COPY_EXISTING_REGEXP - "sp\(in\|cl\|pr\|wi\)[0-9][0-9][0-9]\.spl" nowhere
		SPRINT spell_res "%SOURCE_RES%"
		TO_UPPER spell_res
		LPF NAME_NUM_OF_SPELL_RES STR_VAR spell_res RET spell_name END
		SPRINT "%spell_name%" "%spell_res%"
END

 

I mean, in 99% of cases that's probably overkill, but just to be precise...

Link to comment
2 hours ago, AL|EN said:

The link to the appendix has a typo: the uppercase A should be lowercase: 

https://gibberlings3.github.io/Documentation/readmes/weiducourse/weiducourse_a.html

 

So, annoyingly I caught that and uploaded a new version 2 minutes later, but it doesn't seem to have been picked up by the system.

Link to comment

I have now completed Chapter 2 and the information so far is extensive.

I will use this in combination with the WeiDU documentation (but not always because sometimes I just like to experiment😬) as this course is much easier to understand and contains lots of code examples.

In my personal opinion, this course feels like reading a well-written book on programming.

The only "downside" I see is that (new) mod developers who have no experience in programming will have a hard time understanding it.

On the other hand, determined (new) mod developers with no programming experience will have manageable material to learn from, which is not a given when it comes to modding IE games, as far as I can tell.

Thank you for your work! I'm very glad you wrote it.

Link to comment
14 hours ago, Incrementis said:

I have now completed Chapter 2 and the information so far is extensive.

I will use this in combination with the WeiDU documentation (but not always because sometimes I just like to experiment😬) as this course is much easier to understand and contains lots of code examples.

In my personal opinion, this course feels like reading a well-written book on programming.

Thanks! That's high praise.

14 hours ago, Incrementis said:

The only "downside" I see is that (new) mod developers who have no experience in programming will have a hard time understanding it.

I'm hoping that chapter 1 is basically intelligible to new modders without programming experience. Beyond that, I think there's a limited amount I can do - WEIDU is a programming language, ultimately, and systematically teaching people to program is beyond me. The hope is that chapters 2 and on are useful to people who have a bit of programming experience but want to learn WEIDU in particular.

Link to comment

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...