Jump to content

Downloadable sample code: yay or nay?


Gimble

Recommended Posts

A suggestion:

 

Post a downloadable ZIP file somewhere with all the related John files as sample code. It's often extremely helpful to download a single package that a new user can begin playing with without having to muddle through the whole process from scratch.

 

Beyond that, thanks for the tutorial. I haven't delved much into Weidu or character creation ( mostly a scripting guy ), but this certainly helped me. I may even have to play with creating an NPC just to see it work.

Link to comment
A suggestion:

 

Post a downloadable ZIP file somewhere with all the related John files as sample code. It's often extremely helpful to download a single package that a new user can begin playing with without having to muddle through the whole process from scratch.

 

Beyond that, thanks for the tutorial. I haven't delved much into Weidu or character creation ( mostly a scripting guy ), but this certainly helped me. I may even have to play with creating an NPC just to see it work.

 

 

You're quite welcome.

 

About the ZIP: this tutorial's intention is to teach people how to create their own NPC and get a first hand experience at modding. What would be the point of just giving them a bunch of code for them to fill in? Not a good teaching method from my perspective.

 

If that's how modding is to be done, then by all means, Grim Squeaker should simply give us all his Jelina files and we simply fill in the content with our own "creative" writing.

 

Copy and pasting is one thing. *Giving* people code is another, and not a good idea.

Link to comment

It's a difficult one I admit. I agree with theacefes that giving people finished code is not an amazing idea, because once you do that some people will just ticker that rather than writing their own (which leads to crazy things like people all using the J# prefix or the same state names). On the flip side, it's good to be able to see 'the one we made earlier', so they can compare their code with some finished code and see where they are going wrong.

 

I guess whether they'd abuse finished code depends on what kind of modder they are. Do they want to learn or do they want to throw together a quick silent NPC? I'm hoping everyone's the former but sadly I know that's not the case.

 

I guess if I had to choose I'd say that zipping up some finished code is probably a good idea, as it's a good reference but I'd make a point of saying that you should really only look at this if you're stuck (because you'll learn a lot more trying - and probably failing, but that's okay - at writing code from scratch).

 

Anyone else got an opinion?

Link to comment

I'm not above cutting and pasting chunks of code, but it all has to be changed so much it would be unrecognizable, anyway.

 

I must admit, though, that having a format template is handy. It saves a lot of typing.

 

Typing

CHAIN

IF WEIGHT #-1

~CombatCounter(0)

InParty("jaheira")

!StateCheck("jaheira",CD_STATE_NOTVALID)

Global("B!GavinRandomBanter1","LOCALS",0)~ THEN ~BB!GAVIN~ RidiculousRandomGavinBanter1

~How the hell did I get roped into this, anyway?~

DO ~SetGlobal("B!GavinRandomBanter1,"LOCALS",1)~

= ~_BJAHEI~ ~Shut up, you're just an example.~

EXIT

 

time and again is tedious. Probably got the CombatCounter wrong. Have to check.

 

Anyway, you get the idea.

Link to comment

I hate to disagree with Grim Squeaker, since not only is he a Guru but has specifically helped me over and over again learn all sorts of stuff; plus I am not sure how to come down on this question. It would not really have helped me to have a tutuorial mod, because I avidly researched threads and contrasted other mods code to get started. I do even have a "not a good idea" example:

 

The reason you are such a strong teacher, Grim, is that you do an analysis of the code the new modder provides, which tells you what they don't understand. You then give clear indications of what is wrong, provide examples, and even give references to other mods to look at. The tutorial template mod might take away some of that.

 

For instance, in an early request for help I did not have my head around statenames and what they really meant. If I had used a template, you would have gotten me on the right track for the one problem, but not detected that I was hopelessly confused about the bigger topic.

 

On the other hand, I definitely copy/paste and edit in temporary files, playing with bits of other folks code to see how they work. I understand that existing NPCs are complicated, and a simple template could allow folks an easier entry. I guess my vote I cede to berelinde... I threw together a 4th-wall-breaking sample Gavin for her, with really silly tutorial banters and DisplayStringHeads in BAF to show how to establish testing messages to see if the scripts she creates actually play ("Hi berelinde, I am running my 3rd block BCS right now" "Hi berelinde, I just set this variable to 1"). I have this very stong feeling she learned much more from reading other code than from the "tutorial" Gavin, but I could be wrong :)

Link to comment

I'm not sure it matters, honestly. Someone who wants to see working code can just download any of the umpteen NPC mods and browse .d files, or the even-more-than-umpteen mods that add or alter dialogue of any stripe. (One of the reasons why I try to comment so extensively in my code is that I expect folks to browse through the files.) In the end, it's not going to matter if they have a sample .d file or one from a mod--if the tutorial's not understood, the end results will be poor.

Link to comment

I've been using a hybrid system: finding mods with nice, abundantly commented coding (CamDawg and Jastey are great for this--I don't know if it's to help future generations or just to make it easier to find stuff if ever you need to, but it works for both) *and* using templates *and* getting a lot of help from experienced modders *and* visiting tutorials *and* learning through trial and error (mostly error).

 

I suspect that technique would work for most people. No tutorial, no matter how well written, can cover everything.

 

I don't think making a downloadable template would hurt, but I definitely think that anyone who is serious about learning to code their own NPC should download everything available, all 700 NPC mods, if necessary, and look at what people have written.

 

Just another example of how everyone is different: many people write everything out, then go back and fill in the code. That doesn't work for me: I miss too much doing that. Good thing I type fast.

Link to comment
Just another example of how everyone is different: many people write everything out, then go back and fill in the code. That doesn't work for me: I miss too much doing that. Good thing I type fast.

 

I find that the only people you 'handwrite' dialogues are really green modders or people who are part of a writer-coder pair for making a mod. Personally it I find it so much easier just to code straight away (though I can't .tra straight away as that pisses me off too much).

Link to comment

Maybe I'm an ass for thinking this, but I don't think that experienced modders should do all the work for learners, which is what making a zip would be the beginnings of.

 

Really, if someone wants to learn to mod that badly, it's not that hard to do what we all had to do...download other mods and use their code as an EXAMPLE, read tutorials, trial and error until they get it right.

 

Really, if one wants this tutorial code so bad, copy and paste it on Notepad, and just read off it.

 

Either that or we could hand them a mod on a silver platter.

Link to comment

Hrm; seeing as I basically made Jonathan from this tutorial, and then explored ideas the way I wanted to do them (PartyRested trigger for spawn, instead of OnCreation, etc), I'd say that a download would have hampered me.

 

But, I'm coming at it as a programmer with 20 years of professional experience, and a CIS degree. A layman is another story entirely. I think what we are seeing is a generation coming with ideas about what they want to do with computers, but no grounding in what's happening behind the pretty flashes and things on the screen. they are told to make <mymod>.d as a file, and they have very little idea how to do that.

 

So, maybe making a ZIP file which would have template files - they would generate errors in WEIDU until the person has followed the tutorial - and perhaps even a .reg file for them to register the modder files for a weidu mod as notepad.exe txtfile. In other words, make it less scary to them.

Link to comment
Guest Kwite Shi

I am NOT a computer programmer with 20 years of experience, but I don't think that level of understanding is necessary for IE modding.

 

As someone who's just fiddling around with inserting an NPC into a game I've been finding out what goes into making a mod and it's a multi-layered learning process to say the least. I'm still really just finding out how much I don't know vs how much I think I know.

 

One VERY helpful thing I did to get my feet wet with WeiDu was look at the difference between an uncompiled .d file (inside the mod folder) and a decompiled version of the same file. I'm sure this sounds basic to most of the experienced modders out there but it was quite useful for me to *understand*.

 

A template is a bad idea from what I've seen just because I can't imagine a template for dialogs and scripts that wouldn't require a better than basic understanding just to adapt it to each specific use. Certainly nobody's suggesting a template for every possible convolution of dialogs and condition checks et al?

 

Cam Dawg had the right notion on this. I think a template is redundant given the vast amount of mods you can just download and look at.

 

In fact, if you're at the point where you think you're ready to plug your work into a template but you don't know how to look at a .tp2 file, extract a .d file and be grateful for the CHAIN command then you're probably not as ready as you think you are.

 

 

I'll go back to lurking now.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...