DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • May 19, 2013, 06:18:47 PM
Home Forums News Links Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
IRC Channels
Search

Pages: [1] 2   Go Down
  Print  
Author Topic: I like to think I've been a good little noob.  (Read 2101 times)
0 Members and 1 Guest are viewing this topic.
CavemanJoe
Mod God
*****
Offline Offline

Posts: 555


Opener of WormCans


View Profile WWW
« on: May 09, 2007, 08:48:58 AM »

I've read the documentation, played through the game, used the "Search" function, had prior experience (with Dragon Knight), known the basics of PHP, and I still had problems understanding Translation.  I still installed lots and lots of modules before beginning to translate the basic game.  I still, in my enthusiasm, acted like a Bad Newbie and got in over my head.
But then, rather than ask questions, I used the "Search" function again, played with the Translation Wizard until I felt I kind of understood it, reinstalled the game with NO modules at all and went back to the drawing board and the documentation.  I like to think I've mended my ways.

I like documentation.  I like reading it, and I like writing it; writing documentation helps me to understand.  I also feel that newbies should always have a hand in the creation of documentation, because the more experienced you get, the harder it can be to remember what it was like when you actually needed an FAQ, and thus, the harder it becomes to write effectively for your target audience.

So, I've made a quick Newbie Guide to customising the game.  Please, take a look at it - if for nothing else than to check if I'm correct in my assumptions about how Translation works.  If you like it, then feel free to use it, change it, expand upon it, whatever you like.  If you don't, please tell me where I'm incorrect in my assumptions.

Consider this my first of what I hope to be many contributions. Smiley

Thanks!

~Caveman Joe

(newbie guide follows)

A NEWBIE GUIDE TO CUSTOMISING YOUR GAME

This is a quick run-down written by a noob for other noobs, hoping to explain how to customise your game to create a unique theme, such as samurai, pirates, Three Kingdoms, sci-fi, or whatever your imagination can produce.

Initially I was confused when trying to customise my game, because although I've played about with lots of PHP applications in the past, I could always change the text in said applications by editing language files.  LOGD has no such independant language files - the text to output in, say, a Dragon encounter is actually stored within the dragon.php file.

So, rather than editing, say, public_html/language/en.php to give your game a sci-fi theme, you would edit "translations" of each bit of text, stored in the database.  These translations are stored alongside the original bit of text, so that the game knows when to display what.

When we talk about "Translating" a game, we could mean translating it into a different language, or translating it into a different world.  Whether you're talking about making all the text German, or making all the text military-themed, or pirate-themed, or sci-fi based, what we're doing is always "Translating" the game.

LOGD's Translation system works by creating a table in your database full of translations to particular phrases or lines of text, and giving you an interface to mess about with that table.  Thus, you can change lines of text directly in your browser.  While this approach is confusing for newbies, it ends up making a lot of sense - this way, you can give your creation team access to translate the game without needing to give them the FTP information for your server.  How cool is that?

There are two commonly-used methods by which people translate the game into their chosen language or theme:

1. Using the inbuilt Translator Tool.
2. Using the Translation Wizard module.

The Translator Tool is already installed on your server, but you most likely haven't activated it yet.  You need to grant yourself access to it, before you can see its effects.  To do so, edit yourself under the User Editor, go to Superuser Flags, scroll down a bit and you'll see it.
Check the box, hit Save, and you'll see little red T's all over the place.  By clicking those T's, you can edit the adjacent text.
Now, some T's will appear to be in the wrong places.  For example, you might see a horizontal line of T's running across the bottom of each page that actually correspond to the status texts on the screen's right-hand side; don't worry, they're only there because they can't be directly next to the text that they correspond to.
To edit some text, we just click on a T and enter text in the lower box of the window that opens up (leave the text in the top box intact).  If you make a mistake and want to start again, just close the window.  Once you've entered your desired text in the lower box to replace text in the upper box (which, I'll say again, should be left unchanged), press "Save and close."  Refresh the page and your text should be changed.  The colour of the little box surrounding the "T" will change to blue, so you can quickly see which bits have been translated and which haven't.
And it's as simple as that.  You can go through your entire game this way, and theme it however you desire.  However, this will take an awfully long time.  The Translation Wizard, while initially more confusing, is a sight more powerful.

LOGD's Translation Wizard was originally created to translate the game into different languages.  Thus, the name becomes a little misleading if you're planning to use it for other purposes, but as long as you understand that "Translation" really means the act of changing text in any capacity, you should be fine.
For now, we'll assume that you're going to translate the game into a sci-fi/pirate/military/whatever theme, so the first thing you should do after installing the Translation Wizard is to set your language to English.
To do this:
Superuser Grotto -> Translation Wizard -> Change Current Scheme.
At this point, the rest of the options will probably be a mystery to you.  They were to me, too, and the documentation for them wasn't terribly idiotproof, so I'll do my best to explain what to do.

The Translation Wizard lets you edit the game's text without having to go to the particular page where the text is displayed (which could be a real bitch if you have to trigger a random event a dozen times so you get the right output).  It also lets you do procedures like Search and Replace.
I'm not going to give you a rundown on what each and every option does - that's already been done.  What I'm going to try to do is get you basic operating knowledge of how the Translation Wizard works, and that should be a good base from which you can find out for yourself what all the bells and whistles do.

This is a conclusion I've drawn based on my noobish observations of how the Translation Wizard does its thing, and so it might be wrong - but hell, if it is, then it's a decent enough analogy.

From what I gather, the Translation Wizard works by looking for bits of text that haven't been translated yet.  It knows when something hasn't been translated yet because the Translations part of the database contains more than just the translations of text in the game - it sucks up the original text too, so that it knows where each bit of translated text should go (so that, for example, when a file says to output "You've slain the dragon," it looks up "You've slain the dragon" in the table and replaces it with its translation ("You've slain the Blair Hippo"), if there is one).  Thus, you have a "Translations" tabel and an "Untranslated" table.

So, the Translations table first has to have something to cross-reference with the Untranslated table, or the Translation Wizard won't know which bits we want to translate.  We've got to fill up our Untranslated table with the stuff that we want to change, before we can tell the Translation Wizard what we want to change that stuff to.  The Wizard will then put the translated text in the Translations table, and the game will know to check the Translations table for translations of text in the Untranslated table before it outputs that text.

People use the Translation Wizard in a number of different ways, and if you search around DragonPrime you'll get an idea of other methods you can use.  For me, the following has proven the easiest method to understand:

STEP ONE: GETTING TEXT TO TRANSLATE

Superuser Grotto -> Translation Wizard -> Advanced View -> Scan Modules

Now, you'll be able to scan individual files in the game for text to change.  If you've been paying attention to your Address bar while playing the game, you'll have a good idea of what these files mean.  If not, it should be pretty self-explanatory: dragon.php for fights with the dragon, forest.php for stuff that happens in the forest, home.php for the starting page, it's all fairly obvious.

As a general rule of thumb, you shouldn't scan files contained in the lib folder, or files like dbconnect.php that are essential to the game's mechanics and don't contain any tasty language anyway.

Now, for an illustration of principle, click in the topmost drop-down selection box and select "dragon.php."  You're taken to a new page showing all of the translatable text in dragon.php!  Now, to suck up the bits that you want to change and store them away ready for editing, just click the checkbox next to each one and click "Insert Selected into your Untranslated table."

All done!

Now, remember this: the whole reason that we selectively tell the Wizard which text we want to translate is so that we're not faced with thousands upon thousands of lines of text, most of which doesn't need changing anyway.  So FOR GOD'S SAKE ONLY DO ONE FILE AT A TIME!  If you go through the whole game sucking up the untranslated text before you start to translate any of it, you'll quickly find yourself totally overwhelmed and seriously confused!  Take it slow, take it easy, and do the files one at a time.  Trust me on this one - I may be a noob, but I'm a noob who's made some silly mistakes, and in a perfect world I would be the last one to make those mistakes.

STEP TWO: TRANSLATING THE TEXT

Now you've got some text that you want to translate, go and have a look at the "Translate by Namespace" option on the left hand side of the screen.
By changing the namespace to match the name of the file you just scanned, you can find all the text in that file.  Now, simply click on "Edit" for each text line, and you can change "The Green Dragon" to "The Blair Hippo"!
As you go through your untranslated stuff and begin to translate it, you'll see the translated entries disappear from the list.  Now, we want to keep this list neat and easy to deal with, so if there are any bits of text that don't need translating, we can delete them from the "untranslated" table.

That's it for my little guide - hopefully now you have the beginnings of a decent understanding of how to theme your game.

Have fun!
Logged

Nightborn
Guest
« Reply #1 on: May 09, 2007, 08:53:19 AM »

Decent work Wink many might find that useful and it should be added to the wiki.

Just in general:

Quote
From what I gather, the Translation Wizard works by looking for bits of text that haven't been translated yet. 

<--- depends. the "translated? yes-no" appears only i.e. if you pull in text or scan. it double-checks the translations table.

basically it operates, if you have activated the text collection i.e., on the untranslated entries.

To fill your untranslated table, you need to

a) activate the core text collection "grotto->settings"

b) pull in some translations for your scheme using the central translations DB

c) scan files and insert them

Logged
CavemanJoe
Mod God
*****
Offline Offline

Posts: 555


Opener of WormCans


View Profile WWW
« Reply #2 on: May 09, 2007, 09:03:27 AM »

Thanks for your kind words!  If this could be added to the Wiki, that'd be great - I'd love for other people to be able to edit this. Smiley

Whoops!  That's right, I forgot to mention that it doesn't actually look for text that's not translated, you have to tell it where to find the text, so that couldn't really be called "looking..."  Good call, and I can see how that could be misleading.  I should be more careful of that sort of thing!

I experimented with collecting text via the "always collect" option in the Game Settings menu, but I found that having all that text going into the untranslated table got quickly overwhelming, and preferred to work on one file at a time.  Having never had experience with database-driven translations before (only file-based), I found it an easier stepping-stone (for me, anyway) to do things one file at a time.

I never did understand the "Push" and "Pull" stuff, and couldn't quite wrap my head around the documentation - maybe I should try to write a Newbie Guide for that too, in an effort to understand it. Tongue
Logged

SaucyWench
Mod God
*****
Offline Offline

Posts: 2238


I'm a good girl.


View Profile WWW
« Reply #3 on: May 09, 2007, 09:16:11 AM »

Excellent! Thank you!  Cheesy

(Possibly OT: Can someone confirm something for me? I was always told {eons ago by The Great Ones} not to edit the bottom box of the standard translator if I made a mistake, but to delete it all, save, then go back and enter the correct one, in order to avoid a duplicate database entry. In fact using the wizard I did find duplicates and I suspect they were from me doing that... Is this still the case or has the code been fix0red to avoid the problem?)
Logged

SaucyWench
Owner of GemDust.com and Darton City proudly hosted by LunarPages
Nightborn
Guest
« Reply #4 on: May 09, 2007, 09:24:52 AM »

Well, one edit is "fine" ... a second entry is generated, but saved.

yet, a second change cannot occur, there will be the "duplicates" error.

You have to use the wizard to remove those duplicates.
Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5427



View Profile WWW
« Reply #5 on: May 09, 2007, 12:33:30 PM »

Thanks for your kind words!  If this could be added to the Wiki, that'd be great - I'd love for other people to be able to edit this. Smiley

Add it yourself!   Grin

Nice work - your wiki login is the same as your forum login...enjoy, and thanks.
Logged

Play the latest beta version here on DragonPrime
CavemanJoe
Mod God
*****
Offline Offline

Posts: 555


Opener of WormCans


View Profile WWW
« Reply #6 on: May 09, 2007, 01:49:57 PM »

Whoo!  Grin  Gimme an hour or so - I want to clean the article up, and expand a little upon my original points.
Thanks! Cheesy
Logged

CavemanJoe
Mod God
*****
Offline Offline

Posts: 555


Opener of WormCans


View Profile WWW
« Reply #7 on: May 09, 2007, 04:01:59 PM »

OK, it's added to the wiki, along with some advice detailing stupid things that I did, mistakes I learned from, and measures that other noobs can take to avoid them.  I've put it in the "HitchHiker's Guide" section, and hope to make more guides of a similar nature.
I made that section 'cause I think that if there are any other FAQ's written especially for absolute noobs, they should go in there too.
Hope you find it useful.  Grin
Logged

Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5427



View Profile WWW
« Reply #8 on: May 09, 2007, 04:07:17 PM »

Don't forget to pack a towel and your toothbrush.  And DON'T PANIC!

It's good to get this sort of documentation coming from the perspective of someone new to the game.
Logged

Play the latest beta version here on DragonPrime
ShadowRaven
Mod God
*****
Offline Offline

Posts: 800


Silence is a virtue...


View Profile WWW
« Reply #9 on: May 09, 2007, 04:13:33 PM »

Wow, looks good. great job!
Don't forget to pack a towel and your toothbrush.  And DON'T PANIC!
Fines Talisman for violation of the DragonPrime humor Embargo 2007
Logged

~ShadowLegacy~

~Dark Waters~

Want to advertise your site?--->Project Wonderful
CavemanJoe
Mod God
*****
Offline Offline

Posts: 555


Opener of WormCans


View Profile WWW
« Reply #10 on: May 09, 2007, 04:18:09 PM »

Thanks!  While I'm here, what the hell is the "Eye-Catching Pavilion"?  I see it in the namespace for village.php, but I can't find any reference to it either in my game, or in here.  Huh
« Last Edit: May 09, 2007, 04:25:54 PM by CavemanJoe » Logged

Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5427



View Profile WWW
« Reply #11 on: May 09, 2007, 04:19:35 PM »

Wow, looks good. great job!
Don't forget to pack a towel and your toothbrush.  And DON'T PANIC!
Fines Talisman for violation of the DragonPrime humor Embargo 2007

No humour intended.  He was discussing hitch hiker's guides, and I needed to ensure he was properly qualified to do so.

I don't have a humorous bone in my body.

The eyecatching pavillion refers to the Beta testers section, an admin configurable setting which is normally turned off these days.
Logged

Play the latest beta version here on DragonPrime
ShadowRaven
Mod God
*****
Offline Offline

Posts: 800


Silence is a virtue...


View Profile WWW
« Reply #12 on: May 09, 2007, 04:23:34 PM »

Wow, looks good. great job!
Don't forget to pack a towel and your toothbrush.  And DON'T PANIC!
Fines Talisman for violation of the DragonPrime humor Embargo 2007

No humour intended.  He was discussing hitch hiker's guides, and I needed to ensure he was properly qualified to do so.

I don't have a humorous bone in my body.
* ShadowRaven nods
Good.

Pavilion.php isn't even included in the core downloads anymore....
« Last Edit: May 09, 2007, 04:25:14 PM by ShadowRaven » Logged

~ShadowLegacy~

~Dark Waters~

Want to advertise your site?--->Project Wonderful
CavemanJoe
Mod God
*****
Offline Offline

Posts: 555


Opener of WormCans


View Profile WWW
« Reply #13 on: May 09, 2007, 04:41:28 PM »

Does the ban extend to humour as well, or only humor?
Logged

Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5427



View Profile WWW
« Reply #14 on: May 09, 2007, 04:45:44 PM »

Does the ban extend to humour as well, or only humor?

You're in the UK, hence you are restricted to the use of humour which is banned.  But I think I should ban humor as well, otherwise the 'mericans will exploit the loophole.
Logged

Play the latest beta version here on DragonPrime
Pages: [1] 2   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

Support Us
$100 raised this year
Your help is greatly appreciated!
Who's Online
24 Guests, 0 Users
DragonPrime LoGD
Recent Topics
Home Forums News Links Downloads Login Register Advanced Search