Updating the website walkthroughs

Updating the website walkthroughs

Posted: 2012-06-02, 03:37

by Stoo

I've been having some trouble getting a new entity to actually work properly in a new map, so I've been following the tutorial at http://www.cafu.de/wiki/modding:addingnewdmentities trying to figure out what I'm missing. Didn't have any luck, so I thought I'd go back and follow it exactly, creating a duplicate Speaker2 object

Turns out, the code as presented doesn't compile anymore! I cheated and looked at the Speaker code that's actually distributed, and there's a missing struct in the header and a missing #include in the code file that I've found so far.

I just figured I'd go ahead and update the code in the walkthrough to match the code that's actually distributed, but I wanted to check first - is there any kind of review process? Or do we just update as we like, and let the history page sort it out?

Re: Updating the website walkthroughs

Posted: 2012-06-02, 11:16

by Carsten

Hi Stoo,

thanks for looking into this!

I'd be very happy if you updated the tutorial page with the current code. For each submitted change to a Wiki page, I receive an email with the diff that describes the change, so yes, there is (kind of) a review process built in.

Btw., there is no need to wait for any review feedback and no need to to worry about triggering too many emails, or making corrections multiply or later, I can easily deal with all that. In fact, I prefer several smaller changes over a single big one, especially when the smaller changes are "logically one unit each", where one logical unit is whatever you think is appropriate.

Feel free to make any changes as you desire!
Thanks in advance!

Re: Updating the website walkthroughs

Posted: 2012-06-05, 01:14

by Stoo

Well, it's just a few lines changed to reflect what's in the download version of the code files, but the changes are in.

I'm wondering if there's not one more step that's new since this was written, though; or if I'm just missing something again... I've added duplicate "Speaker2" code files that have the same contents as the Speaker.cpp and .hpp files, and a duplicate entry in the EntityClassDefs.lua; with all Speaker references converted to Speaker2. But, when I try to use it in a map, I'm getting:

Warning: No type info found for entity class "speaker2" with C++ class name "EntSpeaker2T".

Re: Updating the website walkthroughs

Posted: 2012-06-05, 23:32

by Carsten

Stoo wrote:Well, it's just a few lines changed to reflect what's in the download version of the code files, but the changes are in.

I'm wondering if there's not one more step that's new since this was written, though; or if I'm just missing something again... I've added duplicate "Speaker2" code files that have the same contents as the Speaker.cpp and .hpp files, and a duplicate entry in the EntityClassDefs.lua; with all Speaker references converted to Speaker2. But, when I try to use it in a map, I'm getting:

If I remember right, I just copied Speaker.cpp/hpp and did a find/replace on all the EntSpeakerT lines. I also went through and eyeballed everything, since they don't all quite match that string (#include Speaker2.hpp, etc).

Re: Updating the website walkthroughs

Posted: 2012-06-07, 00:08

by Stoo

Ugh... figured out my issue... nothing to do with any of this, just didn't have my setup right.

But, now the walkthrough's slightly more current!

Re: Updating the website walkthroughs

Posted: 2012-06-07, 01:07

by Carsten

Ahh... thanks for the update!

I was just trying to reproduce this (and couldn't) when I saw your message!