Find/Replace

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Find/Replace

Post by Chaos Awakes »

Now that we have an (excellent) find feature in the editor, how about adding a replace to it? IE: Replace all the Antmen in the dungeon with Couatls? You would simply present a standard "Add Item" dialog and then go through and delete and replace all items of a particular type with the new item, keeping the same item ID so you don't break any mechanics.

This raises another point actually which I meant to mention before. If I have a door, for example, which is pointed to by multiple triggers, and I decide I want to change the door type, currently I have to delete all the triggers, then delete the door, then add the replacement door, then put all the triggers back. Shouldn't there be a simple way of replacing one item for another and keeping it's item ID the same so that triggers pointing to it don't have to be removed and put back afterwards?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

1) Save your dungeon in the editor

2) Open up the dungeon text file in notepad

3) Use the find and replace there

4) Save your dungeon in notepad

5) Open your dungeon again in the editor

:lol:
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Post by Chaos Awakes »

Well duh :)
But you could've said that about Find but you thought it worth putting it to provide convenience. Isn't the point of the editor so that novices don't have to know how to edit a text file, this sort of seems to defeat that purpose.
User avatar
Gambit37
Should eat more pies
Posts: 13769
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Have to agree with you there -- I certainly favour putting as much control into the editor as possible (only when it's worth it of course).

This is one of those situations where it's worth it.
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Isn't the point of dungeon creating to know a little about the format you are writing to? There's novices and novices

It's not hex editing - the items have explanitory names and the dungeon file is fully commented and are in a .txt file!

Anyway, while extra functions are always good if it makes life easier, an attempt should always be made to at least try and find an alternate method I feel if for no other erason it expands your abilities and lets you know the limitations of a system
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Post by Chaos Awakes »

Also, of course, the find and replace might need to be done several times in notepad. You might be changing an object for exactly the same object simply in order to change various stats about all of the objects of that type in the dungeon. In the editor, this would be a case of simply refilling out the object placement screen - in notepad, you'd have to do several find and replaces. In fact, it would be harder than that - you'd have to do it manually if you were just changing stats as doing a "find/replace" in notepad from 205 to 137 would replace all numbers 205 and not just those attributed to the item your changing.
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

But that's not the function you asked GG for - you are asking him for a more complex find and replace in the editor so more work, but also then maybe not what notepad can do.

Or were you just making examples of where the simple notepad substitution wouldn't work?
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Post by Chaos Awakes »

I'm afraid I can't agree with you on this one Beowuuf - I'm a programmer and I always work on the principle that if someone wants it, I'll provide it. If one person out of all my users asks for a feature, and it's a simple job or I've got the time, I'll add it just so one person is happy and I'll feel good about myself for making someone's life easier - so I'm never going to be of the "no, you can already do this by doing X, Y and Z" group!

When designing something like an editor, you should always make the assumption that your users have never turned a computer on before. An editor, by definition is for people who want everything done for them and don't know how to do anything themselves. It's easy to say "hey, you should learn", but why? That applies to programmers or experts, not to basic users - basic users shouldn't have to learn anything, that's why Windows was invented so people didn't have to learn commands and could just click an icon.
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Post by Chaos Awakes »

No beo, a find and replace in the editor would be simple. It would just offer up the normal dialog for adding an item to a square. But instead of adding the item to a square it would replace existing objects with the new object. If the user wants to change all of his antmen with 100 hit points so that they have 200 hit points, he just does a find/replace and replaces antmen with antmen with 200 hitpoints. Actually, I see where you're coming from - you'd need a condition to say only antmen with 100 hitpoints get replaced, hadn't thought of that. But I suppose the user could create a cloned antman so he could use search/replace later...
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

I would like to have a funciton called do_mything() and it runs. Users may want simple possible features, but there must also be some knowledge or else the end designer will be doign all the work for them. Windows is a general operatign system that has to be able to be operated by the most limited technologically knowledgeabel person. It fails, btw. DM clones are for people building a dungeon, and to do this they would need to be able to realise alot of their goals through mechanics. So really there needs to be a learnign curve, unfortunately, for designing. Because hopefully they are doign thigns that haven't been done to death before, and hence need a different combination of actions. RTC tries to be flexible, and the editor tries to be helpful in this regard. But surely requests shoudl be made on the basis of having at least tried other methods and learning, btu then finding iit too hard, or havign done it but feelign it is a hack that wouldn't be transportable/doable by the majority.

Actually, my point was not the pitfalls, I wasn't thinkign that far, the fact was you hadn't fully specified your aim, and hence rejected GG's statement with complications. The fact you yourself can see complications in what you were asking shows that you are askign for soemthign complex, if not 'hard'. Not a find/replace function as in 'sword to ploughshears' but 'sword if it is sub type rusty goign to sword _blue with runes disassociated from it and 2 charges, but only if the charges were 0 or 1 to start with' type replace.

Anyway, doens't matter to carry on the debate, I'm off this weekend and besides the original request this has shifted from about the find/replace fucntion, however complex it becomes, you and gambit have asked for it, ball is in GG's court now!
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

GG wrote:2) Open up the dungeon text file in notepad
just in case there are still people using notepad, i strongly recommend them to take a better text editor with syntax highlighting and a good search/replace dialog.
I use EditPad (pro version) with Delphi/Pascal syntax : this one fits pretty well with RTC format.
Some free editors, if you don't wanna pay : Notepad++ or CONtext are good choices.
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Post by Chaos Awakes »

I use CuteHTML which I use for my websites, just turn off the syntax highlighting and make use of the linenumbers :)

I didn't think I was asking for anything that complex, to be honest. I don't really see how it matters what subtypes or whatever are being replaced - at the end of the day you are simply removing something from a square and adding something different. What I am asking for is no different from right clicking a square, selecting Edit, pointing at an item on the tile and choosing delete, then choosing Add and putting something different on the tile - except that with find/replace it would do it automatically over several tiles instead of having to do it manually, and the item ID of the item added would be the same as the item deleted.
How do subitems and things become relevant? It doesn't matter what is on the tile, you just delete it. It doesn't matter what your adding, you just add it - delete and add are already existing features, I'm just asking for something which does it automatically for several tiles at once.

Find -> Antman.
Replace with -> Couatl with 100 hit points and a sword.
User avatar
Sophia
Concise and Honest
Posts: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Chaos Awakes wrote:I didn't think I was asking for anything that complex, to be honest.
You were mistaken.
Chaos Awakes wrote:I don't really see how it matters what subtypes or whatever are being replaced - at the end of the day you are simply removing something from a square and adding something different.
The problem is that the "something" and the "something different" can be completely different classes of objects.

Even your example shows some of the pitfalls-- "with a sword," that means several instances of the sword will have to be replicated. It's not so simple already. By the letter of your logic, all of the Coutals will be carrying the same sword, which you surely didn't want.

How about "Find -> Antman, Replace with -> Floor Drain," watch the editor go nuts. "Find -> Counter, Replace with -> Relay." Does it retain the targets? Do the values stay the same? Having to manually redefine all the targets to a replaced trigger ruins half the neatness of this, and having them preserved creates a lot of zany special cases that nobody (the least of which George I'm sure) wants to deal with.

This is a mess.
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Post by Chaos Awakes »

I don't know why I bother. It's obvious that nobody wants the editor to be useful or usable to anyone without advanced knowledge, so people like me who don't want to edit a text file will obviously have to take a long time to get a dungeon finished and you'll all have to wait longer for it.

You do realise that this approach just begs to produce dungeons full of bugs. If a feature is available in the engine, and there's a bug in it, the next version of the engine corrects the bug - nobody has to start their games again, nobody has to change anything in their dungeons. If everything requires advanced dungeon mechanics then any bugs need to be fixed in the editor which means everyone's games in progress are messed up, it's far easier to have a dungeon full of bugs if you have to rely on dungeon mechanics to do the most basic things rather than just having a feature.
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

I want new dungeons!

Personally I want everyone to have tried the dungeon mechanics that exist to their fullest so we can see the existing bugs and know the mimits, not ask for new methods and we have two sets of bugs, and two mthods that actually don't do what a future desiner might want them to do. Which by the way we might not get fixed for a long time, because I would hope that sooner rather than later GG gets his real life back again and be too busy to release so much so soon and spoil us!

Perosnally I want to get as many advanced or necessary features as possible. That includes making existing stuff more usuable to new dungeon designers. But I feel if people try out the engine first and try longer methods, they will learn and make better dungeons because of it, and be in a better position that to

Don't take any comments as negative, jsut frustration and debate - it seems that there is ALOT of new features out, alot of potential, and rather than everyone checking for bugs in the new features and tryign them out they are nasking for more and more stuff or jsut not reading the documentations and comments about how to use the new thigns. And some new features are being asked for without showing (I understand you may have thought about it, but then you don't then say) that the ramifications, limitations or logical next step neded is asked about
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

It's obvious that nobody wants the editor to be useful or usable to anyone without advanced knowledge,
It's not that, its the fact that a find and replace such as you're suggesting is horrifically complex. There are an infinite number of possibilities to swap to another infinite number; each with a huge variety of permutations. For example, how about swapping all ant men with a health of 100 and a sword to a ful bomb with a strength of 46.

Purely from the perspective of the usability of the pop-up dialog box in the editor - how would it hold enough options and still be useable?

As Sophia pointed out, even once you've got around how to specify the find / replace parameters, theres the question of how to deal with items that have / require specific parameters (e.g. swapping a relay for a chest).

The whole area is so complex, it's something much easier done by a human than a computer.

***************************************

I don't quite follow the rest of your post - can you explain what you mean in more detail so I can fix anything that needs fixing!
You do realise that this approach just begs to produce dungeons full of bugs.
I'm not sure how that relates to find / replace? That's got nothing to do with the playability of dungeons.
If a feature is available in the engine, and there's a bug in it, the next version of the engine corrects the bug - nobody has to start their games again, nobody has to change anything in their dungeons.
That's the idea - how is that a bad thing?
If everything requires advanced dungeon mechanics then any bugs need to be fixed in the editor which means everyone's games in progress are messed up, it's far easier to have a dungeon full of bugs if you have to rely on dungeon mechanics to do the most basic things rather than just having a feature.
I don't follow that at all I'm afraid. What features are you talking about and / or what is the problem?
User avatar
Sophia
Concise and Honest
Posts: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Chaos Awakes wrote:It's obvious that nobody wants the editor to be useful or usable to anyone without advanced knowledge, so people like me who don't want to edit a text file will obviously have to take a long time to get a dungeon finished and you'll all have to wait longer for it.
Wrong. We all obviously want the editor to be useful and usable, if not, we'd all just type the dungeons into text files directly. However, most of us here also try to stretch the existing mechanics to a wide variety of uses, rather than go running to ask for a new feature every time we can't immediately do something. George has already put a lot of time into coding RTC, the beta testers have put a lot of time into testing it, and everyone who edits it has probably put a lot of time into figure out how things work-- there's no reason to diminish all that, when a vast reserve of knowledge and clever tricks have been built up. So what if it requires a little cleverness to get its full effectiveness?

Anyway, what's your idea of "advanced knowledge"? Using notepad? Knowing a little about how the text file format works? If you want to make a complex dungeon full of interesting puzzles, you will have to have some grasp of the complexities of dungeon mechanics. That's just the way it is. You seem to want every advanced feature that you could possibly think of to just be handed to you.

If you're so bent on having find-and-replace, rather than go on some rant about how we all hate new features, why not tell me how you would resolve the very real and very difficult problems I have cited?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

BTW - on the general subject of having a specific object to do something can already be done with many objects, there's no hard and fast rule. Generally speaking, if it can be done in just a handful of steps (say using a trigger and relay together with one or two action wallitems) then it's usually not necessary to have something special to do it. On the other hand if there's something that requires huge numbers of items to achieve an effect (say 10-20 or more) then it's something I'll probably do.

There are a huge number of things that have been suggested and implemented, so feel free to keep suggesting away!
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Post by Chaos Awakes »

Don't get me wrong, I think the editor is fantastic. It is just really frustrating that every time I make what I think is a useful suggestion I get shot down - people just start yelling "no, no, no".

I'm a programmer, and as such when I use the editor I am forever getting frustrated. I have to cut and paste this, cut and paste that, and after a while I think "now, if this was my application, I'd put a button there to do that". Sometimes it just seems like a no brainer. And yet as soon as I suggest something to make my life easier, I get shot down.

If the situation was reversed and I was the application designer, I'm pretty sure my attitude would be "that's difficult, but I like a challenge - I'll do it, and people will find my editor easier to use".

If something is hard, to me that means it's a challenge, which makes me want to do it more, and gives me more satisfaction when people like what I've done.
That's why the dungeon I'm designing is so fiendishly complex, and contains loads of DM2 graphics and 20 levels. I tend to get carried away making something really cool...

lol
User avatar
Gambit37
Should eat more pies
Posts: 13769
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Chaos Awakes wrote:Don't get me wrong, I think the editor is fantastic. It is just really frustrating that every time I make what I think is a useful suggestion I get shot down - people just start yelling "no, no, no".
Um, I think you're taking that a bit personally? There have been thoroughly reasoned arguments here as to why find/replace is a complex task. It's not that it's a bad idea, just that it's very tricky. I'd love a good find/replace feature but if it's as tricky as said, then I can live without it.
Chaos Awakes wrote:And yet as soon as I suggest something to make my life easier, I get shot down.
Maybe that's the problem -- some of the stuff you request might make *your* life easier, but if it isn't generic enough or flexible enough for *everyone*, then maybe that will be a good reason it doesn't get developed?
Chaos Awakes wrote: That's why the dungeon I'm designing is so fiendishly complex, and contains loads of DM2 graphics and 20 levels. I tend to get carried away making something really cool...
Remember restraint! 20 levels of fiendish complexity isn't necessarily fun...! ;)
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Post by Chaos Awakes »

Can you qualify that Gambit? I'd want a game that was as big as possible - given the fact that everyone here loves DM and when they finish playing one dungeon they can't wait to play the next one, what is the difference between that and just carrying on getting further into the one your playing? In other words, what is the difference between playing two 10 level dungeons and one 20 level dungeon?

Obviously I don't want to deliver overkill but I'm designing the dungeon I would love to play so others opinions are great. Obviously a smaller dungeon gives me more scope for ideas for a sequel (which I'm going to do anyway), but personally I'd love a nice big dungeon.
User avatar
Gambit37
Should eat more pies
Posts: 13769
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Well, bigger isn't necessarily better. That's all.
Chaos Awakes
Artisan
Posts: 187
Joined: Sat Jan 22, 2005 2:50 pm
Location: Ipswich, UK

Post by Chaos Awakes »

That's true.
I think I've kept the balance, I filled up 20 levels with all the puzzles and fighting areas I could think of, so I don't want to start adding new things and make it even bigger or I'll have nothing for the sequel.
Most of the stuff in my dungeon is quite complex, hence my desperately trying to make life easier for myself lol. It's got a lot of stuff that's dependant on doing other things elsewhere, so lots of replay value if you miss things. And lots of surprises.

To clarify: When I say complex, I mean from the dungeon mechanics point of view. I don't mean to suggest that I've got 20 levels of puzzles that nobody can solve :)
User avatar
Sophia
Concise and Honest
Posts: 4306
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Chaos Awakes wrote:I'm a programmer, and as such when I use the editor I am forever getting frustrated.
Oddly enough, I am one too, and yet, I have no such problems.
Chaos Awakes wrote:I have to cut and paste this, cut and paste that, and after a while I think "now, if this was my application, I'd put a button there to do that".
Not necessarily. You can still put your programming skills to use: Learn a little about how the .txt file format works, and write some code to automatically generate what you want, then paste the output right into your dungeon. I did that several times for some really insidiously complex rooms when I was making Surgical Strike.
Chaos Awakes wrote:If the situation was reversed and I was the application designer, I'm pretty sure my attitude would be "that's difficult, but I like a challenge - I'll do it, and people will find my editor easier to use".
So, then design a solution! As I stated before, you never actually put forth any suggestions as to how to get around the significant problems with a search-and-replace as you requested it. If you were able to come up with some means of avoiding all of the pitfalls that your initial idea would introduce and give a useful searching-and-replacing interface, then, I am sure that George would be more open to implementing it.
User avatar
Ameena
Wordweaver, Murafu Maker
Posts: 7552
Joined: Mon Mar 24, 2003 6:25 pm
Location: Here, where I am sitting!
Contact:

Post by Ameena »

I know bog all about computer programming and stuff, but before the editor came out I started making a few dungeons in Notepad. It's not complicated once you figure out the basic commands (easy once you've glanced through dungeons like DM and the Zoo), just tedious. If you've got the time and motivation to make twenty levels of mechanically-complicated puzzles, would it be a great deal of effort to fiddle around a few things in Notepad that you can't do in the editor?
______________________________________________
Ameena, self-declared Wordweaver, Beastmaker, Thoughtbringer, and great smegger of dungeon editing!
User avatar
Adamo
Italodance spammer
Posts: 1534
Joined: Fri Apr 22, 2005 11:59 am
Location: Poland
Contact:

Post by Adamo »

Chaos Awakes wrote:
When designing something like an editor, you should always make the assumption that your users have never turned a computer on before.
uhh, this IS my case ! when I started designing a dungeon over a year ago I was a completely lame ! (I still am, but now at least I know, in general, how some basic DM mechanisms works, simply by comparing how original dungeons are designed in the editor and how it works in a "reallty"). It`s the best way to learn how to use the editors, IMHO.
Spoiler
(\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/) (\__/)
Spoiler
(@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@) (@.@)
Spoiler
(>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<) (>s<)
Post Reply