Game Development Community

Map Description

by Joseph Euan · in Game Design and Creative Issues · 01/21/2005 (3:43 am) · 11 replies

Hi,

Bit of a noob question sorry...

How do I show the Map Description on the startmissiongui screen like you see on the LoadingGui screen (I want to click a mission and see it's description)?

Or give me an idea of where to start looking.

Thanks in advance.

Joseph

#1
01/21/2005 (3:30 pm)
[u]This is probably not the right way to do it, but it works.[/u]

After you save your mission from the mission editor, it creates a mission file in data/missions.

Navigate to the data/missions directory (such as c:\Torque\example\data\missions) and open up your new mission file. Near the top of the file is this section:

new ScriptObject(MissionInfo) {
        desc0 = "D&D meets UCLA";
        desc1 = "Sorority slashing taken to a new interactive high.  Gothic and disgusting.  Don't let your little brother play this.";
        name = "Blood and Gore";
    };

name is the name it will be called in the "Select Mission" GUI. name is also the title that appears in the "game loading" GUI.
desc0 is a short description of the mission, and desc1 is a longer description. Both appear as text in the "game loading" GUI.

[u]Now, Here's the right way to do it.[/u]

After you save your mission from the mission editor, it creates a mission file in data/missions.

Before you close the mission editor, click the + next to "Mission Group - Sim Group", and then click "MissionInfo - ScriptObject" Click the "Expand All" button and fill in the desc1, desc0 and name fields.

Now click "Apply", and save the mission again.
#2
01/22/2005 (11:28 am)
Ray,

Thats not what I want to do sorry...

I want to do somthing like.... www.marinainternet.co.uk/dev/gui.jpg
#3
01/22/2005 (11:57 am)
Oh, I get it. You want the desc0 and desc1 text that is normally displayed during LoadingGui to be displayed beside the mission names when you hover over or single-click on a mission name in startMissionGui -- kind of like what UT2003 does.

Anyone?
#4
01/23/2005 (5:15 am)
Ray, yeah that's what I want to do... I'm sure there was a resource/code snipit that lets you do this and also add screenshot from the game... but I can't find it (so many files on GG)
#5
01/23/2005 (7:51 am)
Replacing that orc in the background with a screenshot? That's much easier than the first problem you gave us. Look for a file called background.jpg in the client/ui directory. Replace it with your own pic that has the same dimensions.

Your idea for showing desc0 in this earlier window is a very nice one. That's an appropriate place for the description to show up. I just don't know enough about Torque UI design to figure it out.
#6
01/23/2005 (1:07 pm)
Eric, I don't mean in the background (I know how to do that)

I was talking about a resource/code snippet that I think showed the mission description along with a small screenshot from the mission next to it. (unless I dreamt it)

This forum doesn't show up in the "What's New?" section so I guess I have to wait until someone with the knowledge finds it.
#7
01/23/2005 (3:47 pm)
It does show in the Whats New section if you subscribe to it (like I do)

I'm a bit of a beginner myself, but I decided to have a hack at this last night, and made some progress (even if it felt a bit ugly). I like trying to find solutions to problems as it helps me learn.

I took the startMissionGui, and duplicated the getMissionDisplayName function at the bottom to be getMissionDisplayDescription and made it return desc[0]. A bit hacky as sometimes missions have a desc[1] etc as well.

Then in the onWake function where it cycles the mission list getting the name, I just made it grab the descriptions as well (stored it in SM_missionList.desc[i]) and that grabbed the descriptions fine. I went to bed after that, but all thats left to do is display that (somehow), and if you want the pictures, store a path to the picture in the Mission files ScriptObject part underneath name and desc0 (eg picture = /mod/missions/stronghold.jpg) and grab it exactly the same as I did with the description (store it in SM_missionList.picture[i] or something)

Not exactly a solution, but maybe something to work with? I might try to actually make it work later when I have more time ... or someone more knowledgable will come along and give you a more elegant solution.
#8
01/23/2005 (6:43 pm)
OK, I did a tiny follow up on this - but got stuck (on what seems something trivial) and have some things to do before I can come back to it.

Heres two screenshots that basically show how far I got

startMissionGui

Console showing that it works

So yea, I'm a n00b and cant actually display the result in the gui, lol.

Basically I looked in the GuiTextListCtrl's header files in the source code to see what functions there were. There is a getSelectedID() function, so wrote this very simple return function

function getSelectedMissionDescription() {

%descID = SM_missionList.getSelectedId();
return SM_missionList.desc[%descID];
}

point to note: the onwake function does a sort on the list, which could mess up how the descriptions correspond to the mission names. Need to look at that closer.

I'll be back later tonight to hopefully solve it :P
#9
01/27/2005 (3:28 am)
Hey Vernon,

Have you had any luck with it yet?

Joseph
#10
01/27/2005 (10:46 pm)
Ah, I haven't got back to it actually. You know how it is ... start something ... never finish it :D

Its not high on my list of priorities, as it was just something to do while I was bored, its not related to my game at all. The bulk of it is there, just got to display the result and call a "repaint" when the selection is changed. At least thats what I'm assuming, I'm sure there'll be a catch. If I get time I'll try to look at it this weekend.
#11
02/07/2005 (2:39 pm)
I still haven't managed to do this :\

If anyone could help me, please post.

Thanks
Joseph