Updating the website walkthroughs

This forum is about this website itself: the content pages, the forums, and the wiki.
Stoo
Posts: 42
Joined: 2012-05-11, 00:28

Updating the website walkthroughs

Postby Stoo » 2012-06-02, 03:37

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 :P

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? :)
User avatar
Carsten
Site Admin
Posts: 2006
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Updating the website walkthroughs

Postby Carsten » 2012-06-02, 11:16

Hi Stoo,

thanks for looking into this! :up:

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!
:wohow:
Best regards,
Carsten
Stoo
Posts: 42
Joined: 2012-05-11, 00:28

Re: Updating the website walkthroughs

Postby Stoo » 2012-06-05, 01:14

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:

Code: Select all

Warning: No type info found for entity class "speaker2" with C++ class name "EntSpeaker2T".
User avatar
Carsten
Site Admin
Posts: 2006
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Updating the website walkthroughs

Postby Carsten » 2012-06-05, 23:32

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.

:thanks:

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:

Code: Select all

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


In the .cpp source file, did you also change the string parameter to "EntSpeaker2T"?

Code: Select all

const cf::TypeSys::TypeInfoT EntSpeaker2T::TypeInfo(GetBaseEntTIM(),
    "EntSpeaker2T",      //  <---- this one?
    "BaseEntityT", EntSpeaker2T::CreateInstance, MethodsList);
Best regards,
Carsten
Stoo
Posts: 42
Joined: 2012-05-11, 00:28

Re: Updating the website walkthroughs

Postby Stoo » 2012-06-06, 05:16

Yeah, I've got that one... copy-and-paste:

Code: Select all

const cf::TypeSys::TypeInfoT EntSpeaker2T::TypeInfo(GetBaseEntTIM(), "EntSpeaker2T", "BaseEntityT", EntSpeaker2T::CreateInstance, MethodsList);


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).
Stoo
Posts: 42
Joined: 2012-05-11, 00:28

Re: Updating the website walkthroughs

Postby Stoo » 2012-06-07, 00:08

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

:wallb:

But, now the walkthrough's slightly more current! :roll:
User avatar
Carsten
Site Admin
Posts: 2006
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Updating the website walkthroughs

Postby Carsten » 2012-06-07, 01:07

Ahh... thanks for the update!

I was just trying to reproduce this (and couldn't) when I saw your message!
:cheesy: :up:
Best regards,
Carsten

Return to “Website, Forum and Wiki”

Who is online

Users browsing this forum: No registered users and 1 guest