Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

 

Ah, okay... I thought that was the reason for the crash.

Not a C coder... But a "Segmentation fault" means, some pointer pointed to an unallocated address into memory (and you got lucky, that it did not point to some random but allocated address, because it would probably just have acted weird after release without telling you, that there is anything wrong at all).

Regardless, how broken your model is, that means, that you found a bug in TDM. That is the chance for someone with actual C skills and source code access to investigate further (or not, if it is not considered more worth to hunt down, than some other bugs - and there are always bugs in software of the size of a 3D game engine).

There might or might not additionally be a bug in your model and you indeed might or might not be able to get around it by experimenting with the exporter...

Link to comment
Share on other sites

Not a C coder... But a "Segmentation fault" means, some pointer pointed to an unallocated address into memory (and you got lucky, that it did not point to some random but allocated address, because it would probably just have acted weird after release without telling you, that there is anything wrong at all).

Regardless, how broken your model is, that means, that you found a bug in TDM. That is the chance for someone with actual C skills and source code access to investigate further (or not, if it is not considered more worth to hunt down, than some other bugs - and there are always bugs in software of the size of a 3D game engine).

There might or might not additionally be a bug in your model and you indeed might or might not be able to get around it by experimenting with the exporter...

 

It's beyond me how and why so many programs still use allocated memory segments, instead of just using variables which revert to their default value when not allocated! eg: int is 0, float is 0.0, string is "", bool is false, etc. idTech 4 is a relatively old engine, but I'm seeing this even on modern software... come on!

 

In any case, since it's only a few kb and I plan to post those on Gitlab anyway, I'm attaching the custom arrow lwo files here in case anyone wishes to take a look at them. Obviously they have no material or texture, but it's only if anyone else wishes to debug with them.

 

https://www.sendspace.com/file/nuql6w

Link to comment
Share on other sites

It's beyond me how and why so many programs still use allocated memory segments, instead of just using variables which revert to their default value when not allocated! eg: int is 0, float is 0.0, string is "", bool is false, etc. idTech 4 is a relatively old engine, but I'm seeing this even on modern software... come on!

I really like to hate and rant about C and languages with manual memory management in general... But in this case: It is a game engine. It does a lot of complicated things. And it has to do that sixty and more times a second. Of course it is written in C - a language that for most stuff is an order of magnitude faster than Java (wich is still a lot faster than interpreted Python).

Most application software out there should not have been written in C/C++ in the first place - but games in general and especialy 3D game engines like the id Tech 4 are not in that group. They need all the performance they can get. TDM is certainly not more buggy than other stuff written in that language and the bugs are the price we have to pay to have this nice game, that runs fine on an i5 or even an ole Core2 Quad (most of the time).

Link to comment
Share on other sites

Don't forget that the "you found a bug in the engine" statement is just an assumption. Note that the segmentation fault is coming from the engine itself (more precisely OpenGL if I am not wrong), not the OS. If the engine really would try to access memory it isn't allowed to, the error would come from the latter, though.

 

By google I found that this seems to be a common issue under linux. Are you using that OS? It seems that the reason is often a conflict with the graphics driver. Is your model using anything unusual (a custom shader or so)?

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Where? I don't see any reference to lod there.

 

Probably something is wrong with either your def or your model.

Thanks for saying that Obs - I've been trying to get them to understand that it's probably the model and definition that's the problem here, but they won't listen.

Link to comment
Share on other sites

I just started playing around with the readables in my map but I do not get them working.

 

After mapping, everything works fine, I can open doors and scroll through the weapons inventory.

 

But as soon as I try to interact with any sort of readables, everything goes wrong: doors cannot be opened anymore, weapons cannot be selected...and the text within the readables does not show up as well.

 

I have to add that I received an error message when I worked with the readables editor for the very first time, but I don't recall the content and the message did not show up during later attempts.

 

What can I do about this?

Link to comment
Share on other sites

This happens when something is wrong with your xdata.

 

I covered readables in my New Mapper's Workshop series. Might be something useful: https://youtu.be/rMfDN_m-S8g?t=10m10s

  • Like 1
Link to comment
Share on other sites

Jack, the readables editor in DR has always caused me problems.
Often this manifests as things becoming "unfrobbable" after trying to read the thing you made using DR's readable editor.

Making everything manually and writing the files yourself can resolve any issues (in particular, the xd files - placing prefab readables without using the editor appears to work more often than not):
http://wiki.thedarkmod.com/index.php?title=Readables
http://wiki.thedarkmod.com/index.php?title=XData_File_Creation

It's not as complicated as it might appear.

 

// if you open the game console (for me, bound to ctrl+alt+` <-- left of 1 at top), what are the messages that are displayed after you frob the readable..?

 

// also if you want to be flash and make it easy for localisation/translations (that for some reasons is now called "internationalization" on the wiki..: http://wiki.thedarkmod.com/index.php?title=Internationalization - use #str

// also - there's inconsistency between Americanization and Americanisation in the article. I'm not gonna change it. Just pointing it out - the title is Americanized, the content remains the proper spelling :P

// well... I learned something new today: https://www.w3.org/International/questions/qa-i18n

Edited by teh_saccade
Link to comment
Share on other sites

the book xd files should be written in a program that doesn't add extra character like word processors do. Something like wordpad on windows shouldn't be used. but notepad is ok.

 

A major problem with books is newline, don't use the return key to make a newline in the readable text, it makes the book not work.

 

its \n for newline

  • Like 1
Link to comment
Share on other sites

Yeah, I prefer using notepad+. Besides the fact that it doesn't add extra chars, it also has syntax hilighting. This is extremely useful, especially as you can specify your own presets to be used for certain data types (recognized via their file ending).

  • Like 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Gents,

 

Thank you very much for the quick help.

 

@teh_saccade -this is what the console reports:

 

WARNING:script/tdm_readables.script(155): Thread 'atdm_readable_immobile_book01_1': Non-existant xdata declaration: readables/pag10/test
WARNING:script/tdm_readables.script(182): Thread 'atdm_readable_immobile_book01_1': num_pages not defined on readable atdm_readable_immobile_book01_1
WARNING:Couldn't add entity atdm_readable_immobile_book01_1 to inventory of player1

 

I will try the alternatives as per your replies above, but I would prefer the editor, of course; it's a cool tool...

Link to comment
Share on other sites

There is nothing wrong with the editor. I suspect that either your xdata file isn't saved in the right spot,or there is a typo in it.

 

Can you post the text of your xdata file here?

Link to comment
Share on other sites

Hello Springheel,

 

Here is what (a new - because I have erased the previous readables) xdata files contains:

 

readables/pag11/sample1
{
precache
"num_pages" : "1"
"page1_title" :
{
"Tales from Space"
}
"page1_body" :
{
""
""
""
"Blind text Blind text Blind text"
}
"gui_page1" : "guis/readables/sheets/sheet_paper_hand_nancy.gui"
"snd_page_turn" : "readable_page_turn"
}

 

 

Speeking of which, thank you very much for the "caulking" hint. All my portals are working, at last. Should have asked here much earlier.

  • Like 1
Link to comment
Share on other sites

Is this the same file that is resulting in the error in your map? I don't see a "readables/pag10/test" entry.

Link to comment
Share on other sites

Sorry Springheel,

 

I forgot that my previous console report would be the reference. I had already deleted the old attempt in question.

 

Here is what the console reports with the xd file as per my last post:

 

WARNING:script/tdm_readables.script(155): Thread 'atdm_readable_immobile_scroll01_1': Non-existant xdata declaration: readables/pag11/sample1
WARNING:script/tdm_readables.script(182): Thread 'atdm_readable_immobile_scroll01_1': num_pages not defined on readable atdm_readable_immobile_scroll01_1
WARNING:Couldn't add entity atdm_readable_immobile_scroll01_1 to inventory of player1

Link to comment
Share on other sites

Ok, so the next question is how is your DarkRadiant set up? It seems like TDM isn't able to find the xdata file. This will happen if you have your map and your xdata file in two different folder structures. This may or may not be relevant: https://youtu.be/sz5u398AgP4?t=41s

 

What are the folder paths to the map file and the xdata file?

Link to comment
Share on other sites

Ok, that looks like a problem. If the map is in the main Maps folder, then the xdata file should be in the main Xdata folder.

 

Try moving the xdata file to Dark Mod/xdata/

Link to comment
Share on other sites

I thought that wasn't a problem anymore? I have a faint memory of something being done about that a few years back.

Link to comment
Share on other sites

Hello Springheel,

 

I just copied the folder in Windows to the mainfolder...and now it works! (Oh yeah, oh yeah, oh yeah!)

 

If you ever come to Upper Bavaria, I will buy you one beer, or two, or even three.

 

Should I restructure the entire game paths as recommended in your tutorial?

 

Thanks a lot. That's what I call a dedicated community.

Edited by JackFarmer
  • Like 1
Link to comment
Share on other sites

Eventually you will want to create a special folder for your FM, the way I describe in the tutorial. If you think you're going to be doing any creation of custom content (your own materials or skins, for example) then you should set this up sooner rather than later. Otherwise there is no rush.

Link to comment
Share on other sites

And give TDM and DR its own partition (D:\) :)

Xdata structure, as per Springheel's guidance:

http://wiki.thedarkmod.com/index.php?title=Mission_Filestructure#xdata (search readables - there is no link)

Strings structure, as per wiki:

http://wiki.thedarkmod.com/index.php?title=Mission_Filestructure#strings

Which leads me onto the difference between the Spanish words, "año" and "ano", considering no enye is available in TDM:)

"Han pasado cinco anos desde..." hahaha.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.


  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...