FRUA & DUNGEON CRAFT Community Forums

Dungeon Craft => Dungeon Craft - Troubleshooting => Topic started by: Draugr on October 08, 2015, 08:24:20 PM

Title: Frustrating Editor Issues...
Post by: Draugr on October 08, 2015, 08:24:20 PM
OK, I had a big message typed up because my events were randomly changing data in them. I couldn't figure out the problem at all. I was just about at wits end. Then before I posted the long message, I decided to try one more time. This time I FOUND the exact CAUSE of the ISSUE!

So, hopefully I can explain it and some of you here with more experience can assist me, because right now I feel totally defeated with all the time I now wasted.

I have a random encounter event that has up to 7 random encounters. I finish the first random encounter chain and it looks something like this.

Random Event
    Random Chain 1: Encounter Event
                                      Combat Chain: Combat  (151)
   

There is quite a bit more to he event, but that is all that is needed to explain the issue.

I then instead of typing the entire chain process again for random chain 2, I simply copy and paste Random Chain 1 into Random Chain 2. I then go in and change the Encounter small pic and text.

Next, I go in to the Combat Chain and add the monsters for the 2nd Random Encounter. I then save and test, but something is wrong. While the randomly chosen 2nd Encounter shows the correct small pic and text for the Kobolds, when the Combat Chain executes, it has the Goblins on the battlefield from Random Chain 1. WTF is going on? Believe me this is a very brief explanation. I spent hours and hours designing these events which have a lot more to them than just the Encounter and Combat chain events.

So, I go back and look, this is what I see.

Random Event
    Random Chain 1: Encounter Event
                                      Combat Chain: Combat  (151)

     Random Chain 2: Encounter Event
                                      Combat Chain: Combat  (151)

After going crazy trying to figure out the issue, it is there staring me in the face. (151) I realized that must be the ID number for that particular Combat Chain, now there are two of them, so when I change the data in one, I guess it saves to both which ruins the second combat chain because it now matches the first.

This has got to be a bug, otherwise, why bother with a COPY/PASTE option if you can't copy an event and then paste it either within the current event to hasten up the repetitive task of writing 7 Random Encounter events, or to paste it in another space on the map to negate the need to type that whole BIG event over again each time you wish to re-use it? COPY/PASTE has got to be there for time saving, write one event, copy it to other cells then change the internal data as necessary and you cut down event writing time by 80% or so. Doing this should also automatically change the chain IDs to avoid these type of issues. Sadly, this doesn't seem to work because when you do this the event and chain IDs in the copies all remain the same and when you change the data for one, it changes them for all. Time saving negated and actually multiplied because of the time you spend pulling your hair out trying to figure out what is going on. Is it me, or is it a bug, etc...

Please someone tell me this is a bug and not how the program is supposed to operate. If this is actually normal and how the program is supposed to work, then please tell me how I can write a big event, then re-use it elsewhere in the map without having to type it all up each time I need it?

Sorry for the long post, but believe me this is the second in a row, the first I deleted before posting because I noticed the potential bug in the chain ID and so had better information on the cause of this issue..

John
Title: Re: Frustrating Editor Issues...
Post by: Paul R. Stevens on October 08, 2015, 08:48:01 PM
If you can cause two references to the same event ID
then you have discovered a bug.  Things will get worse
when you delete one of them!!!!!  If this is in a design that
you want to save, please leave both references as they
are for now.  I'll see what went wrong and let you know
how to safely correct the problem.
Title: Re: Frustrating Editor Issues...
Post by: Paul R. Stevens on October 08, 2015, 09:01:56 PM
I just tried this using editor version 2.26.
It fails exactly as you describe.
Thanks....I'll be back.  Promise.
Title: Re: Frustrating Editor Issues...
Post by: Draugr on October 08, 2015, 09:02:20 PM
Thank you.

 I was so disappointed because my design is moving along well, and I am actually enjoying the development. Then this issue popped up and I couldn't figure out what was going on until hours later when I noticed the IDs.

Thanks Again
John
Title: Re: Frustrating Editor Issues...
Post by: Paul R. Stevens on October 08, 2015, 10:29:13 PM
Oh, my God.

From what I can see, the Copy/Paste was never meant to
work.  It appears to totally ignore any chained events other
than the "Normal Chain".  And I don't yet see how even that
can work.

If we want Copy/Paste to work in anything like a reasonable
way, I am going to have to go into development mode for
an extended period.
Title: Re: Frustrating Editor Issues...
Post by: Draugr on October 08, 2015, 10:36:07 PM
Darn. So that means we will have to type up each event each time we need to use it in a level, module, etc...?

Without copy and paste designing large complex events will be too tedious. A shame as I was so happy to get  this design completed so I could play it and make it available to the rest of the community.
Title: Re: Frustrating Editor Issues...
Post by: marainein on October 08, 2015, 10:49:59 PM
I don't fully understand the editor, but - is it possible to have an event jump to another event on a different part of the tree (in other words, can an event node have multiple parents)? So the events behave less like a tree structure and more like a mesh/web/programming language structure?
Title: Re: Frustrating Editor Issues...
Post by: Draugr on October 09, 2015, 06:48:43 AM
Paul,

I just wanted to ask this question so I know whether to continue working on other elements of my module, or if I should abandon the development due to that Copy and Paste issue.

Do you know if you will go into "development mode for an extended period" as you mention above? I understand if the answer is no, or not anytime soon. I just would like to know what I should do with my module development.

Thanks for all your help.
John

PS: Would a possible work around / temporary fix be to allow the designer to change the reference numbers for each chain in an event? If that can be done as a temporary resolution then we can manually change the reference numbers and keep a notepad at our side to record which reference numbers we have previously used and which numbers we haven't. I guess that might be one temporary resolution if it is possible.

Also, can I simply delete the events in my module except the originals of each copied event and not have problems? I'd rather delete the duplicates than leave them in the module for now. Please let me know.
Title: Re: Frustrating Editor Issues...
Post by: Paul R. Stevens on October 09, 2015, 09:44:06 AM
I was a bit hasty with my Copy/Paste analysis.
I found a perfectly functional Paste code buried in
an overridden function.  Unfortunately, the 'Encounter'
event was broken when attempting Paste.  This is fixed
in Editor version 2.27

http://dianneandpaul.net/UAF/DungeonCraftEditor_227.zip

Now, what to do with designs that have used this feature
to Copy/Paste an Encounter event with 'fight', 'talk', or
'escape' chains.  The best idea is to restore a level before
pasting such an event.  But that might cause you to have
to repeat an excessive amount of work.  If restoring a
level to a previous version is not reasonable, let me know
and we will try to work something out.
Title: Re: Frustrating Editor Issues...
Post by: Paul R. Stevens on October 09, 2015, 09:52:36 AM
Quote
possible to have an event jump to another event on a different part of the tree

No.  But I think it is possible to jump to an event tree
in an arbitrary cell of the dungeon.  So by splitting your
event chain up and putting the parts into unused cells,
you can accomplish the same thing.
Title: Re: Frustrating Editor Issues...
Post by: Paul R. Stevens on October 09, 2015, 09:56:52 AM
Quote
can I simply delete the events in my module except the originals of each copied event

No, no, no.  There is only one copy of each.  Deleting the
second will delete the first without removing the references
to the first.  Ouch.

If reasonable, we really should restore the level from a
version prior to such errors.  If that is not reasonable,
we need to work out an alternative.
Title: Re: Frustrating Editor Issues...
Post by: Dinonykos on October 09, 2015, 10:04:29 AM
Quote
can I simply delete the events in my module except the originals of each copied event

What happens if Draugr copies and pastes the "doubled" events in the updated version of the editor - won't they be assigned with new numbers? And could he afterwards delete the old events?




Quote
possible to have an event jump to another event on a different part of the tree

No.  But I think it is possible to jump to an event tree
in an arbitrary cell of the dungeon.  So by splitting your
event chain up and putting the parts into unused cells,
you can accomplish the same thing.

The disadvantage of this approach is that in the "regular" version of the game, the coordinates are shown. You can either hide this via big pics, or by changing the config-file that way that the coordinates are not shown. Alternatively, you could use another level, but same coordinates.

Lastly, you can also teleport to the same square where the party is standing, but use variables or quests to get to a different branch of the event tree. This approach is useful for many things, but you have to be careful not to trap the player in an infinite loop...
Title: Re: Frustrating Editor Issues...
Post by: Draugr on October 09, 2015, 11:25:34 AM
OK, not sure if this helps any, or at least makes it easier for me to restart.

I'm fine with losing all the events I made so far. I can write down the basics of each then re-enter them from scratch, then use COPY/PASTE from that point on. My biggest thing is that the dungeon (level) I built so far is quite big and I don't want to have to draw the map again. The events I can simply rebuild. So, if I was to delete all the events so far on a level, then save the design, could I then begin to safely write and copy and paste new events?

Also, Dinonykos mentioned an idea, and perhaps that might be a possible way to fix previously entered events.

Quote
What happens if Draugr copies and pastes the "doubled" events in the updated version of the editor - won't they be assigned with new numbers? And could he afterwards delete the old events?

That sounds like a possible way to resolve the current events. Let us know if that may be a way to make this work.

Thanks,
John
Title: Re: Frustrating Editor Issues...
Post by: ProphetSword on October 09, 2015, 12:09:42 PM
I'm fine with losing all the events I made so far. I can write down the basics of each then re-enter them from scratch, then use COPY/PASTE from that point on. My biggest thing is that the dungeon (level) I built so far is quite big and I don't want to have to draw the map again. The events I can simply rebuild. So, if I was to delete all the events so far on a level, then save the design, could I then begin to safely write and copy and paste new events?

If you're going to delete all events on the level, why not just delete the events that have been broken by the COPY/PASTE bug and leave the rest alone?  Did you copy and paste every event in the dungeon?
Title: Re: Frustrating Editor Issues...
Post by: Draugr on October 09, 2015, 12:23:43 PM
Not all are copied, but if there is some issues that might creep in, I'd be fine with wiping out all my events and retyping them if it will help insure no issues from the bug. I was kind of lucky in that I found this problem rather early on in event design for the level, so while my multiple door encounter event was quite tricky and somewhat long, I only had typed it in once, then copied it to the next room and then discovered the bug. I would have really been depressed if I didn't find the issue until I copied the event 20 or so times that I'd need it and then go in and tweak the encounter data for each room. That would have been a good amount of time lost.

Title: Re: Frustrating Editor Issues...
Post by: ProphetSword on October 09, 2015, 01:07:22 PM
Here's something that will save you time, then:

Open each event.  Copy the text.  Paste them in a WordPad file.

When you start re-doing your level, create the event, copy event text from the WordPad file and paste it into the event.  This way, you're only rebuilding the event structure, but not all the text.
Title: Re: Frustrating Editor Issues...
Post by: manikus on October 09, 2015, 02:16:33 PM
So, holy cow!

When did this last not cause errors, Paul? I have working designs where I have done extensive copying and pasting without any errors (so presumably no dupes).
Title: Re: Frustrating Editor Issues...
Post by: Paul R. Stevens on October 09, 2015, 02:42:55 PM
You cannot safely delete the events.
If you delete one copy, the other reference to a (now)
non-existent event remains.  and will point to a
non-existent event and trouble will brew.

Deleting the entire tree might work because it will try to
delete both references.  After deleting the first the editor
will attempt to delete the second and will either crash
or print an error message and proceed.  So, try deleting
the entire tree and see what happens.  (Backup the
design first, please)  If the editor does not crash and
the event tree has disappeared, all is well.

Otherwise I suggest the following:
Export the level.
Manually remove the event chains in error. (Edit Levelnnn.txt)
Import the level.

I can help you get this done with minimal loss.  The only reason
I did not suggest this initially is that the Export/Import of
levels has not been used very much and could, itself, have
problems.  I hate to have you jump from the frying pan into
the fire.  If you want to try this, and it is not obvious to you
how to edit the levelnnn.txt file, send it to me or post the
interesting parts here and ask for suggestions.  (Backup your
design, please, before making such changes)
Title: Re: Frustrating Editor Issues...
Post by: Draugr on October 10, 2015, 12:15:46 AM
OK.... Back to work. :)

I removed all the events related to the issues and have already gotten the important ones back by retyping them in. Once you get the hang of it all, its a lot faster to make an event. :)

Now... I do have one more question. I have noticed that the reference numbers are working with COPY/PASTE, but there is one thing I noticed. Let me explain...

Event 1 (100)
   Combat Chain (101)

Copy that event then paste and you get

Event 2 (102)
   Combat Chain (103)

Now if I delete either of those two events and then use COPY/PASTE on the other to get a new copy I get this.
Lets say I deleted the First event above with ref#s 100 and 101

The newly pasted Event shows

Event 3 (104)
   Combat Chain (105)

Even though ref numbers 100 and 101 are now freed up because that event was previously deleted, the newly pasted event does not go back and reuse those reference numbers. Same thing happens if you delete the second or last copied version of an event. Is this normal, or ok? I mean I guess it can't be too much of an issue, but it will cause reference numbers to climb rather quickly. Is there any potential problems like running out of valid reference numbers?
Title: Re: Frustrating Editor Issues...
Post by: ProphetSword on October 10, 2015, 07:51:16 AM
I think this is just how it works, whether intended or not. I recently deleted some events in a chain and inserted new ones. The numbers deleted were gone, and new events had higher numbers. It doesn't really seem to hurt anything, and being that you can have millions of events in a design, I doubt those missing numbers would really have an impact.

If it's a bug, it probably isn't a serious one.
Title: Re: Frustrating Editor Issues...
Post by: Draugr on October 10, 2015, 08:20:42 AM
If there are millions or even thousands of events that can be in a design, then yea, the ref number thing is no issue at all. :)

If someone makes a design with over a million events... Holy Krap! LOL
Title: Re: Frustrating Editor Issues...
Post by: ProphetSword on October 10, 2015, 09:03:55 AM
Here's info from the Dungeon Craft FAQ.    I was wrong.  You can have over 16 million events per level x 255 possible levels.  Total number of events per game is actually in the billions:  4,278,189,825.  So, I wouldn't sweat the loss of a couple here and there. Here's more info from the FAQ.

How many quests can I have in my design, and how many variables per quest?

The maximum number of quests is 268,435,455.
Each quest can have values of 0-65001. 1-64999, quest is in progress 65000, quest is completed (successful) 65001, quest is failed


How many levels can I have in my design? How many events?
Max levels 255, each level up to 100x100
Max events 16,777,215 per level
Max zones 16 per level
Max step events 8 per level


How many walls and backdrops can I use per level?
Max wall slots 96 per level
Max backdrop slots 96 per level


How many NPC's and monsters can I have in my design?
Max NPC’s 2,147,483,647
Max monsters 2,147,483,647


How many different spells can I put in my design?
Max spells 1,048,575


How much text can I have in my design?
Nearly unlimited text There is an actual limit on the text at 2 billion characters per text box. That is, each place where you can enter text into an event has the 2 billion character limit.

(This means that the amount of total text characters you can have in the game, based upon my calculator is 8.55637965e+18, whatever number that turns out to be)

Title: Re: Frustrating Editor Issues...
Post by: Paul R. Stevens on October 10, 2015, 10:16:35 AM
The event IDs are 32-bit numbers.  I'd be careful not
to use the top bit.  So the IDs can be as large as
2,100,000,000.  They are not kept in an array but
in a linear list.  So if you use, say, half a million on
a single level, we might have to rearrange them into
a more efficient structure; an array comes to mind.
If we did that then we would also have to learn how
to reuse deleted IDs.  But it works fine as it is for now.
Title: Re: Frustrating Editor Issues...
Post by: ProphetSword on October 10, 2015, 11:05:37 AM
Off-Topic, but interesting:

I doubt that it would ever be a problem that someone would use a half a million events on a single map.  I just worked out some math.  If a person could churn out 20 events an hour continuously, only stopping at the end of the day to take 8 hours of sleep and working on events the rest of the total time, it would take 5.7 years to reach 500,000 events.  I can't imagine how long it would take to actually play a game that long.

For reference: A game like Skyrim only has 244 known quests.  If we associated 100 events to each of those (and I doubt they have that many event steps), that will still only be 24,400 events, or 20 times less than the number of events you'd have to finish to reach 500,000.
Title: Re: Frustrating Editor Issues...
Post by: manikus on October 10, 2015, 02:18:38 PM
Here's info from the Dungeon Craft FAQ.    I was wrong.  You can have over 16 million events per level x 255 possible levels.  Total number of events per game is actually in the billions:  4,278,189,825.  So, I wouldn't sweat the loss of a couple here and there. Here's more info from the FAQ.

How many levels can I have in my design? How many events?
Max levels 255, each level up to 100x100
Max events 16,777,215 per level
Max zones 16 per level
Max step events 8 per level

It's now 16 step events per level.

Quote from: ProphetSword
How many walls and backdrops can I use per level?
Max wall slots 96 per level
Max backdrop slots 96 per level

The level is now 192 per level for each.
Title: Re: Frustrating Editor Issues...
Post by: ProphetSword on October 10, 2015, 04:08:05 PM
Here's info from the Dungeon Craft FAQ.    I was wrong.  You can have over 16 million events per level x 255 possible levels.  Total number of events per game is actually in the billions:  4,278,189,825.  So, I wouldn't sweat the loss of a couple here and there. Here's more info from the FAQ.

How many levels can I have in my design? How many events?
Max levels 255, each level up to 100x100
Max events 16,777,215 per level
Max zones 16 per level
Max step events 8 per level

It's now 16 step events per level.

Quote from: ProphetSword
How many walls and backdrops can I use per level?
Max wall slots 96 per level
Max backdrop slots 96 per level

The level is now 192 per level for each.

192 walls and backdrops?

You should probably update that FAQ.  It's in a sticky.
Title: Re: Frustrating Editor Issues...
Post by: manikus on October 10, 2015, 05:15:48 PM
Done. :)