Project: Area Information Popups

Discussion in 'Negative Energy Plane' started by PlatinumWeaver, Sep 26, 2003.

Remove all ads!
  1. PlatinumWeaver

    PlatinumWeaver Member

    Joined:
    Sep 25, 2003
    Messages:
    44
    Likes Received:
    0
    Seems like a lot of the community, myself included would like some more area pop-ups similar to those found in the start of game tutorial.

    Is anyone else working on this or is it just me? I know where the descriptions are stored and how they're activated.. so I guess i'm part of the way there...
     
  2. Vaevictis666

    Vaevictis666 Established Member

    Joined:
    Sep 25, 2003
    Messages:
    114
    Likes Received:
    0
    Go on go on, details details... the more minds in the know the easier it is to pick up on other details needed to link them in.
     
  3. PlatinumWeaver

    PlatinumWeaver Member

    Joined:
    Sep 25, 2003
    Messages:
    44
    Likes Received:
    0
    okay - The tutorial descriptions are stored in the file help.tab

    There are a number of colomns that influence what you see, not sure if it's the same for the whole file of what..

    help.tab

    Column 1:
    TAG_TUT_ROOM1_OVERVIEW
    The tag of the help entry, this is what is referenced by the python files when they're called.

    Column 2:
    TAG_TUT_ROOT
    Like a catagory for the help file. All of the descriptions so far are in the TAG_TUT_ROOT catagory. Haven't played with this to see if we can create our own or whatever.

    Column 3:
    N/A
    Used for other entries in the help system ( Sub-Catagories? )

    Column 4:
    N/A
    Used for other entries in the help system ( Spell Classes? )

    Column 5:
    Area Information
    Heading for the popup help thang. Simple text.

    Column 6:
    "You come through the entrance of the cave and the floor quickly turns from dirt to slate. The walls transform from natural rock, to layered brick and stone. The air grows heavier with every step you take. There is no question that evil lurks here."



    This is the description that pops up when the entry is referenced. It can be editted. It starts as centered text, but when the text is changed it changes shape. Not sure why yet. The two characters on the end are unknown to me. Probably line breaks? I've been concentrating on the first one which has none till the end.

    ~~ more coming ~~
     
  4. PlatinumWeaver

    PlatinumWeaver Member

    Joined:
    Sep 25, 2003
    Messages:
    44
    Likes Received:
    0
    Python

    That's the actual description that pops up, but what controls it? wonderful .py scripts!!

    scr\py00240tutorial_room_1.py
    Code:
    from toee import *
    
    def san_heartbeat( attachee, triggerer ):
    	for obj in game.obj_list_vicinity(attachee.location,OLC_PC):
    		if (critter_is_unconscious(obj) == 0):
    			#attachee.turn_towards(obj)
    			if not game.tutorial_is_active():
    				game.tutorial_toggle()
    			game.tutorial_show_topic( TAG_TUT_ROOM1_OVERVIEW )
    			game.new_sid = 0
    			return RUN_DEFAULT
    	return RUN_DEFAULT
    
    I dont know much about this stuff, but it doesn't look that difficult to snag this and change it to suit us...

    ~~ more coming ~~
     
  5. PlatinumWeaver

    PlatinumWeaver Member

    Joined:
    Sep 25, 2003
    Messages:
    44
    Likes Received:
    0
    Editting.

    When it comes to actually editing the file I ran into a bit of a problem. I had just an extract of the help.tab file ( basically one line ) in \data\mes\help.tab and some curious things happened..

    1st) The text was no longer centered. Instead of all starting in the same spot, the first line of text started earlier ( more to the left ) than the rest.

    2nd) When you hit 'Ok', another, blank Tutorial window opens up..

    3rd) All the other help is gone, clicking the '?' button in the interface crashes the game.

    So.. What i've learnt? That you have to have the entire help.tab file outside with any changes written inside it.

    I haven't had a chance to test this any further, but I'll keep poking around at it. If anyone knows how we actually get python scripts to fire then I would love to know.. I assume that not all scripts are running at once..

    My only similar experience with this kind of stuff is with Neverwinter Nights, and as bad as the single-player game was, their Editor really helped..

    That's all for now. Any questions?
     
  6. PlatinumWeaver

    PlatinumWeaver Member

    Joined:
    Sep 25, 2003
    Messages:
    44
    Likes Received:
    0
    You asked for more details, so Nerr :p

    Game seems fine if you put the whole help.tab file out in the \mes\ directory, so that's okay.

    It also looks like all the first lines in the help system start earlier than the next lines. I thought it was something I had done but I guess not... if someone could confirm this by taking a look at the tute and telling me if all the text is inline or not I'd appreciate it...

    leasing time on the family's machine because the demo wont run on mine anymore :(

    Interestingly, though probably predictably, because the "Area Information" text is stored in the help file, it means that it can be easily hyperlinked to other areas which I got me thinking... it would be possible to -really- help out newbies by given them the option on -every- new Area Information board to link to a longer description along the lines of the new quest dialogue that's being written.

    "Pushing open the door to 'Whatever the Tavern's Name is' frees the scents and sounds of what appears to be the only tavern in town. A thin haze of smoke, both wood and weed, difuse the glow from the many lanterns and candles. Easily identifyable amongst the patrons are the Innkeep and a serving maid"

    * Innkeep
    * Serving Maid


    ** Innkeep - Dispenser of beers, ales and a safe place to rest. The Innkeep is not always such an easy job, there are always things going on within a Inn that might require the assistance of a friendly troupe of adventures.

    ** Serving Maid - Dodging pinches, leers and lewd suggestions of the Tavern patrons, the serving maid often picks up trinkets of information that might be worth a coin or two from someone new in town.

    ~~

    You get the idea anyway. Does anyone know if we can add hyperlink addresses anyway? I'm assuming we can hack something together...
     
  7. Vaevictis666

    Vaevictis666 Established Member

    Joined:
    Sep 25, 2003
    Messages:
    114
    Likes Received:
    0
    Yes text in the help system has dangling first lines on the left.
     
  8. PlatinumWeaver

    PlatinumWeaver Member

    Joined:
    Sep 25, 2003
    Messages:
    44
    Likes Received:
    0
    Thank you - Glad I didn't mess anything up!
     
  9. Nomad_Wanderer

    Nomad_Wanderer Established Member Veteran

    Joined:
    Sep 25, 2003
    Messages:
    305
    Likes Received:
    0
    Since my first attempt at item descriptions was thwarted, I think it might be neat to use the pop-ups for Item Descriptions..

    My question is this: What part of the game are the pop-ups popping as a result of user action(i.e click,etc.)? and not just game action(i.e. entry or heartbeat)
     
  10. PlatinumWeaver

    PlatinumWeaver Member

    Joined:
    Sep 25, 2003
    Messages:
    44
    Likes Received:
    0
    My apologies for not getting back to you sooner, as I said in another thread, today was quite hectic for me and this forum ( with the address change, skin change and drastic increase in registered viewers ) threw me off balance.

    As to your question..

    As far as I know, the only time you get pop-ups at all at the moment is within the tutorial, so that's where I'm fiddling at the moment.

    There is a pop-up message when you unlock the chest in the second room of the tutorial.

    The script that calls the pop-up into play is "py00242tutorial_room_2_chest.py" - code follows...

    Code:
    from toee import *
    
    def san_unlock_attempt( attachee, triggerer ):
    	if not game.tutorial_is_active():
    		game.tutorial_toggle()
    	game.tutorial_show_topic( TAG_TUT_PICKLOCK )
    	game.new_sid = 0
    	return SKIP_DEFAULT
    
    The line within help.tab is line 846 - TAG_TUT_PICKLOCK..
     
  11. olaf

    olaf Member

    Joined:
    Sep 25, 2003
    Messages:
    25
    Likes Received:
    0
    I liked those info popups a lot. It reminded me very much of playing through a PnP module. It would rock if you got that working for more parts of the module.

    olaf
     
  12. Garner

    Garner Member

    Joined:
    Sep 27, 2003
    Messages:
    15
    Likes Received:
    0
    Those pop-ups made the tutorial look like a completely different game. I'd be glad to offer any assistance I can with writing or proofing descriptions for other areas. Hyperlinking the descriptions to get more detail on specifics is sheer brilliance.

    Bob willing, if Troika releases anything similar to worlded, or if any modders have the art and code skill needed to create new areas, we could build some awesome modules of our own that really, truely, finally feel like there's a DM running the game.
     
  13. PlatinumWeaver

    PlatinumWeaver Member

    Joined:
    Sep 25, 2003
    Messages:
    44
    Likes Received:
    0
    Glad to see some more interest in this feature. :)

    As far as the writing the descriptions, making them valid pop-ups, that's fine and easy.. all you need to is to fiddle with help.tab, add some lines and give the whole thing some sort of structure just so we can see what's going on..

    There are two issues i've identified thus far...

    1) The help.tab file will be editted by other members.
    This isn't really a problem, it's just that there is one file here being changed for more than one reason, so we need to make sure no-one steps on anyone else's toes. In a wonderful, beautiful move, the Troika team didn't make this line specific, but TAG specific. So as long as no-one uses the same name twice, this should be fine...

    eg.
    TAG_CRITICAL_ROLL = Help Section
    TAG_AREA_WENCH1 = Description Section..

    Should be fine..

    2) Second issue is that I dont really know how we're going to actually get the pop-up to, well.. pop-up... I still know practically nothing about how the game calls the python script files. Once we know how to get it to call a file, we can easily assemble some triggers, even if the triggers are based on NPCs in the room or whatever.

    This is the real stumbling block.... that and the complete lack of availability of the game in .au

    Anyway, if you guys want to join me in this little endeavour, please do so... it's not a bug so it's not really high on the communities list, but it's a feature I think everyone would enjoy..

    Ta,
    PlatinumWeaver
     
Our Host!