Jump to content
The Dark Mod Forums

xdata trouble with readable...


PranQster

Recommended Posts

I followed the Readable Editor tutorial, which seemed straight forward. And I checked the screenshot in the tutorial to see that I was doing it right.

Basically I made a readable entity, opened the editor and gave it an XData name in the format 'readables/mapname/notice01'. I then selected a gui definition as shown in the tutorial, typed up the title and body and saved it.

The .xd file was saved in /darkmod/xdata as expected and all seemed good. But when I ran my map, the readable was blank.

I opened it in the readable editor and all looked good. However if I tried to save it again, I got this error:

 

 

"You have imported an XData definition that is contained in a PK4, which can't be accessed for saving.

 

Please rename your XData definition, so that it is stored under a different filename."

 

I tried extracting the .gui from the pk4 file and putting that in the guis/readables directory, renaming it in the process. After reloading DR my renamed .gui was listed with the others in the editor. However I still get the XData definition error quoted above.

 

Confused,

 

PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Yeah, that message has nothing to do with guis. It should basically only pop up if your xdata file is inside a pk4. Please verify that this is not the case and also check the contents of the file. You could also try renaming it. It's been a while since I wrote that code. Maybe there's a bug... Hmn!

Link to comment
Share on other sites

My guess is maybe you imported one of the readable prefabs with the default xdata contents which are indeed inside a pk4. You then perhaps typed in your own xdata contents name but somehow it didn't 'fix' so in-game the default is a blank sheet or book.

 

But if you can see a real xd file and you typed in some text and it still shows in the editor then maybe the editor saved it out with the default xdata contents name not your new name. I dunno.

 

BTW if you are testing live you need to use reloadXdata in the console if you typed it after launching Dark Mod.

Link to comment
Share on other sites

My guess is maybe you imported one of the readable prefabs with the default xdata contents which are indeed inside a pk4. You then perhaps typed in your own xdata contents name but somehow it didn't 'fix' so in-game the default is a blank sheet or book.

 

But if you can see a real xd file and you typed in some text and it still shows in the editor then maybe the editor saved it out with the default xdata contents name not your new name. I dunno.

 

BTW if you are testing live you need to use reloadXdata in the console if you typed it after launching Dark Mod.

 

I did choose one of the prefabs. Basically that's exactly what the tutorial shows, just like in this image:

800px-ReadableEditor.jpg

 

I used 'page_test.gui' and also tried some others. I tried renaming both the xdata name and the .gui each to a custom name. Still got that error when trying to save (but it did save the very first time). I also tried deleting the readable entity and creating a new one... same... only able to save the first time (xdata file gets created in /readables/mapname/).

It seems to me that it should still be able to use the packed .gui templates, or at least create a new one with the chosen name.

Would it help to save the xdata file into a different directory, like '.doom3/mapname/xdata/', but then I'd imagine that would only work when loading the map as an actual mission. Or would it work from '.doom3/darkmod/maps/mapname/xdata/'??

 

Problems aside, I think the Readable Editor is awesome. I tried doing a readable before, but from the older wiki instructions, and it seems that I'm too ADD for that method.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

A thought just occurred to me... (break out the band!)

When you (FM authors) are making your maps, etc., do you all have the Darkmod .pk4 files unpacked into their directories? That would seem to make sense, especially when adding new entities to the game. It might also make sense that this error is not often seen by FM authors if they are working with non-archived files.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

That's how I did it, yes. There are two ways to test run an FM, through the "map" command, where you need all your custom assets (music, readables, scripts, etc) unpacked as normal files and manually-placed in their appropriate folder (that is, music in the "sound" folder, readables in the "xdata" folder, etc), or you save it normally in some folder then manually package it all into a .zip/.pk4 (myMission.pk4, but still in the appropriate sub-folders inside the .pk4) and run it like a normal FM. I did a lot of the development by the first way, but as it got close to the end I started doing it the second way, and would just keep replacing the .map file in the same .pk4 so I wouldn't miss anything.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

PranQster: Just did a quick refresher of the editor and it seems to work fine. I can only think you should do what you quoted in your first post but don't manually rename the gui:

 

"Please rename your XData definition, so that it is stored under a different filename."

 

So rename it to say mymap_notice1 and save it.

 

If you have already messed with the gui name then I suggest you start again. You cannot invent a custom gui name - they are already pre-defined.

 

Create a new readable prefab

In the readable editor, rename the Xdata name to say mymap_notice1

Type some test text

Save and close

Save the map.

Test in game (remember reloadXdata if Dark Mod is already running.)

 

What might be confusing is this. If you use a prefab they are primed with existing gui names and existing blank xdata. Originally we used to do it manually to copy that xdata over and give it a new name. But with the editor you just have to enter the new name in the editor. If you don't it uses the name from the readable entity which is the one in the prefab and that won't work. You have to give it a new unique name and don't manually change the gui name. You can select a different gui from the selector but only pick one of the same type (eg, scroll, book, sheet) or the model won't match.

Link to comment
Share on other sites

PranQster: Just did a quick refresher of the editor and it seems to work fine. I can only think you should do what you quoted in your first post but don't manually rename the gui:

 

"Please rename your XData definition, so that it is stored under a different filename."

 

So rename it to say mymap_notice1 and save it.

 

If you have already messed with the gui name then I suggest you start again. You cannot invent a custom gui name - they are already pre-defined.

 

Create a new readable prefab

In the readable editor, rename the Xdata name to say mymap_notice1

Type some test text

Save and close

Save the map.

Test in game (remember reloadXdata if Dark Mod is already running.)

 

What might be confusing is this. If you use a prefab they are primed with existing gui names and existing blank xdata. Originally we used to do it manually to copy that xdata over and give it a new name. But with the editor you just have to enter the new name in the editor. If you don't it uses the name from the readable entity which is the one in the prefab and that won't work. You have to give it a new unique name and don't manually change the gui name. You can select a different gui from the selector but only pick one of the same type (eg, scroll, book, sheet) or the model won't match.

 

Ok, thanks. Hmmm... but I did enter a new name in the editor. And it did save, just the one time... but showed blank in the game.

Anyway, I'll try it again.

If I still have problems, I'll take screenshots of everything... or possibly even a desktop video.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

That's how I did it, yes. There are two ways to test run an FM, through the "map" command, where you need all your custom assets (music, readables, scripts, etc) unpacked as normal files and manually-placed in their appropriate folder (that is, music in the "sound" folder, readables in the "xdata" folder, etc), or you save it normally in some folder then manually package it all into a .zip/.pk4 (myMission.pk4, but still in the appropriate sub-folders inside the .pk4) and run it like a normal FM. I did a lot of the development by the first way, but as it got close to the end I started doing it the second way, and would just keep replacing the .map file in the same .pk4 so I wouldn't miss anything.

 

Cool. I was wondering how that all worked because I noticed that a custom particle emitter I made (pouring wine) had to be put in a path well above where my tutorial map was loading from. Same went for a custom sound (I have a 1x4x9 dimensioned monolith covered with a sky map and "David Bowman's" voice saying "My god, it's full of stars!" on a trigger) LOL, such a geek 8)

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Ok. How funny! I posted a video to prove that I was doing things properly and still having problems.

Then I dmap and open my map and I am greeted by a note saying:

Notice:

You're Fired!!

 

 

Now my question is... why do I only get one shot at editing the readable and get that error if I try to go back in and modify it?

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Ah, you're working on Linux right? The titlebar always displays where the file is stored. At the beginning it says ".doom3/darkmod/xdata/j3.xd" and after that it says "rkmod/xdata/j3.xd". So where does this rkmod originate from is the question? Please check your preferences menu of DR, specifically "Settings/Readable Editor". What settings did you use there?

 

I assume you used Mod or ModBase directory there, which would indicated that there might be something off with the methods "GlobalGameManager().getModPath();" and "GlobalGameManager().getModBasePath();" on Linux builds. That would need fixing from our side then.

 

As a temporary fix, you could try specifying a custom folder that points to exactly the same location e.g. ".doom3/darkmod/xdata" in the preferences menu (Remember to set "XData Storage Folder" to "Custom Folder" too). This should do the trick if my assumption about the error is correct.

 

Edit: There might as well be something wrong with "GlobalRegistry().get(RKEY_ENGINE_PATH)", because normally the ".doom3" shouldn't be in the window title. It should read "Readable editor - darkmod/xdata/j3.xd".

Link to comment
Share on other sites

Ah, you're working on Linux right? The titlebar always displays where the file is stored. At the beginning it says ".doom3/darkmod/xdata/j3.xd" and after that it says "rkmod/xdata/j3.xd". So where does this rkmod originate from is the question? Please check your preferences menu of DR, specifically "Settings/Readable Editor". What settings did you use there?

 

I assume you used Mod or ModBase directory there, which would indicated that there might be something off with the methods "GlobalGameManager().getModPath();" and "GlobalGameManager().getModBasePath();" on Linux builds. That would need fixing from our side then.

 

As a temporary fix, you could try specifying a custom folder that points to exactly the same location e.g. ".doom3/darkmod/xdata" in the preferences menu (Remember to set "XData Storage Folder" to "Custom Folder" too). This should do the trick if my assumption about the error is correct.

 

Edit: There might as well be something wrong with "GlobalRegistry().get(RKEY_ENGINE_PATH)", because normally the ".doom3" shouldn't be in the window title. It should read "Readable editor - darkmod/xdata/j3.xd".

 

Ok. I'll try using the custom path and manually point it to the default path and see how that works out. Later this evening I'll see where that rkmod directory is, though I have not noticed one in my adventures thus far.

 

And yeah, us Linux users can be a downright pain in the ass sometimes ;) But I am very glad that both DR and TDM are being developed for multiple platforms.

Thank You.

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

No, you don't... ;) Those are mathematical symbols and the avatar is translated to "There exists beer for all"! :laugh:

 

Good luck with trying though!

 

Doh! LOL, well I saw 2 half-consumed drinking vessels. Seeing that they remain half full, then I suppose that works into "There exists beer for all" as well.

System: Mageia Linux Cauldron, aka Mageia 8

Link to comment
Share on other sites

Hey - I'm now ready to make my first real readable with the editor. Wish me luck. The only minor 'difficulty' I think will be I will have to copy and paste the result from a darkmod folder file into my main xdata file in my game folder. Or maybe I'll try my idea of having a separate file for each readable so just copy over the file.

Link to comment
Share on other sites

This is outstanding! :wub: I hadn't got the latest editor while working on Alchemist and anyway continued as normal. So apart from brief tests this is the first time I actually used the readable editor in a real situation.

 

You cannot judge this until you start to use it normally. I find it incredibly good. I'm a nit-picking soandso and obsessed with spacing out and formatting of text to perfection. This is the first time EVER that I made a readable and it was perfect in-game first time. A three-pager too!

 

The editor is intuitive and easy to use (though it helps that I have years of use of xdata and readables and guis no doubt!)

 

The icing on the cake is that it saved the xdata directly into my existing manor_park.xd in my game folder which already had just a signpost text in it. Yikes! Is this editor super-intelligent or what!

 

Excellent professional work StiFu.

Link to comment
Share on other sites

Hehe thanks. I am happy you like it. I was planning on working some more on it, but currently my thesis prevents me from doing so. As far as the save-file is concerned: It's really not that much intelligence in the editor. :) If xdata is imported, the altered text will be saved in the file where the xdata has been found, otherwise it will be stored in the file "[mapname].xd". But how funny that you say it's "professional work", seeing that it was the first time for me to contribute to a professional project that is DR. :)

Link to comment
Share on other sites

I used it last night myself to make my first readable. Was getting some errors trying to save because I had not manually created an xData folder. But once I did that it saved fine.

 

Yes a very handy tool.

 

Made a bunch of objectives too and that's very handy.

 

Now I gotta make a mission briefing, is that possible in the readable editor?

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

May I ask which error message you have received? I guess it would be no problem to fix that issue eventually.

 

 

I'd have to redo it to find out exactly. But something about not being able to open xdata file to save it. (when the issue is really not having somewhere to save it to)

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Now I gotta make a mission briefing, is that possible in the readable editor?

Not at present but it might be possible with a temporary dummy readable gui to simulate the menu briefing gui. I'll take a look and see if I can fix it up quick.
Link to comment
Share on other sites

Now I gotta make a mission briefing, is that possible in the readable editor?

Not at present but it might be possible with a temporary dummy readable gui to simulate the menu briefing gui. I'll take a look and see if I can fix it up quick.
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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...