Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / New commands in V116 - FPGCRAWTEXT

Author
Message
Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 19th Dec 2009 00:19 Edited at: 19th Dec 2009 00:22
Here is an example of using these commands. You have to have v116 or higher.

This is text that can be generated on the fly. This code would go in the main AI of the entity (character or otherwise).



This can also be used for any other entity other than a character. For Example use "Press Enter to Pickup Gold Bar" when you come close to the gold bar. And then use the pick up commands. As you can see you can use this instead of a graphics hud.

Also, you can select the font, size, and color as well as the X/Y position of the text. Uses percentages to be consistent with Lee's methodology.

If I'm not mistaken it automatically disappears when you go outside the player distance to the entity/object.

One other thing. There is a black border that encircles the text to make it stand out more. This was a great addition. At first Lee didn't have this.

-----------------------------------------------
OliveTreeGames
Thraxas
Retired Moderator
19
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 19th Dec 2009 01:46
Thanks for pointing this out Flatlander
Old But Still Kickin
17
Years of Service
User Offline
Joined: 29th Feb 2008
Location: U.S.A.
Posted: 19th Dec 2009 05:31
Great Post FLATLANDER

Never give up trying. Just try it another way that works for you.
Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 19th Dec 2009 05:37
Thanks guys. And Thraxas, I want to see a really bright and shiny nose on Rudolph as it is supposed to be overcast here on Christmas Eve.

A tip:

Fonts are tricky. You can only use a font that everybody would have. Unless you create your own and package it with your game. If you don't use a font that is on the machine that the game is being played on then some awful default font is used.

-----------------------------------------------
OliveTreeGames
Old But Still Kickin
17
Years of Service
User Offline
Joined: 29th Feb 2008
Location: U.S.A.
Posted: 19th Dec 2009 05:49 Edited at: 19th Dec 2009 05:50
I don't know what I do more of....

Read the TGC forums or Work on my Software

Don't fret Flatland. I hear Rudolph got one of those New Halogin Nose Jobs.

Happy Holidays

Never give up trying. Just try it another way that works for you.
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 20th Dec 2009 02:18
Thanks FL. Good info. I have a poser.
What happens if you use a text that the end user doesn't have in his system or does this actually create an image on the fly?

Brian.

Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 20th Dec 2009 07:00 Edited at: 20th Dec 2009 07:01
It is actually drawing text to the screen. It uses the DBPro code:

center text x,y,string

when it is created. No image huds necessary.

Therefore there are no images that it creates. You just assign a text string to fpgcrawtext="text string". Quotes are used to surround the string.

Just give the code snippet a try as is. Create the script and assign it to the main AI of a character. Just some ground, a character and the player startup marker is required. Run the test level and walk up to the character and see what happens. Then walk away. Of course, you have to have v116. Any mod using v116 will work as well.

I hope I understood your question correctly. I have a tendency to get confused sometimes.

Terry

-----------------------------------------------
OliveTreeGames
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 20th Dec 2009 15:46 Edited at: 20th Dec 2009 17:32
It's my fault for using the wrong term. I said text when my question was more concerning fonts. Are you saying that DBPro has "verdana" font included and does not need to access system fonts to write it? If DBPro is writing fonts to the screen, what other fonts can be used?

Brian.

Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 20th Dec 2009 18:31 Edited at: 20th Dec 2009 18:33
I posted this ealrier:

Quote: "Fonts are tricky. You can only use a font that everybody would have. Unless you create your own and package it with your game. If you don't use a font that is on the machine that the game is being played on then some awful default font is used."


The default font that would be used is a system font and I'm not sure which one it is. But it looks horrible. Better to use Verdana to play it safe.

Microsoft includes a few fonts with their windows OS. Verdana is one of them. I am not sure of all of the possible fonts. However, here are some of them:

* arial
* Times New Roman
* Comic Sans MS
* Trebuchet MS
* Microsoft Sans Serif

case is not important. Test them out. DBPro's default font is "verdana." That is why Lee used it in the example from the first post.

-----------------------------------------------
OliveTreeGames
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 20th Dec 2009 18:50
Thanks, that's what I needed.

Brian.

Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 20th Dec 2009 19:57
Your welcome.

The fonts I had named are ones that I was told can be used on web sites and of course any font used on a web site must be on the user's computer. It does seem I had tested them all, however, with the way my memory is, I'm not absolutely sure.

-----------------------------------------------
OliveTreeGames
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 20th Dec 2009 20:03 Edited at: 20th Dec 2009 20:04
Quote: "You have to have v116 or higher."

Leaves me out, but what I find most interesting is the name of the base name for the new actions.

FPGCRAWTEXT

First
Person
Game
Creator
RAW
TEXT

So, I am only guessing that TGC decided on the new non-shooter name.

Was that mentioned in the V116 thread or elsewhere and I missed it?
Or am I wrong about the meaning of the actions name?

   Conjured Entertainment

 WARNING: Intense Madness
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 20th Dec 2009 20:07
Quote: "So, I am only guessing that TGC decided on the new non-shooter name. "


Yeah FPGC is marked all over the source code for v1.16 and I have a feeling they changed FPSC's icon for the same reason.

Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 20th Dec 2009 22:00
As I looked at the source code, it appears that you will have a choice. Either FPSC or FPGC. If the choice is FPSC it will run the game with guns to be a "shooter". If the choice is FPGC it will "not" allow guns but instead will have inventory items assigned to the number keys. It looks like Lee is trying to make this as simple as possible and maintain consistency with his engine design. With RPG Mod there are a lot of inconsistencies which makes it more difficult to use for most people. However, it probably is more versatile.

So far, "raw text" works with FPSC and FPGC. I hope that this will always be the case. But at any rate, you still need v116.

-----------------------------------------------
OliveTreeGames
god games
16
Years of Service
User Offline
Joined: 25th Dec 2008
Location: in a house with a roof on it
Posted: 20th Dec 2009 23:18
and PLAYERDROPCURRENT is to new but idk how it works

don't move handsup
Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 20th Dec 2009 23:54 Edited at: 20th Dec 2009 23:56
PLAYERDROPCURRENT

It has to do with the current entity that is being held. In FPSC, if you are holding a weapon, then it will drop that weapon being the current gun you are holding.

In FPGC, you will have inventory items rather than guns. So, if you are holding a current entity that is part of the inventory then it will drop that entity.

FPGC is not available yet; but, I believe it will currently work with weapons that are being held.

-----------------------------------------------
OliveTreeGames
Thraxas
Retired Moderator
19
Years of Service
User Offline
Joined: 8th Feb 2006
Location: The Avenging Axe, Turai
Posted: 21st Dec 2009 10:05
Quote: "And Thraxas, I want to see a really bright and shiny nose on Rudolph as it is supposed to be overcast here on Christmas Eve."


Don't worry his nose will be extra shiny this year. We're testing out a new nose wax which promises superb results
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 21st Dec 2009 16:34 Edited at: 21st Dec 2009 16:44
Quote: "PLAYERDROPCURRENT"

Well, why am I not seeing this in the v116 thread in the first post that tells the changes?

I see a mention of the rawtext, but nothing about those particular commands.

Where are you guys getting this info? (I'm overlooking it or something)

Are these in the README file of v116? (I haven't downloaded it yet so that would explain everything)

   Conjured Entertainment

 WARNING: Intense Madness
god games
16
Years of Service
User Offline
Joined: 25th Dec 2008
Location: in a house with a roof on it
Posted: 21st Dec 2009 19:03
i was looking by fpscreator.com/downloads.php and find it

don't move handsup
Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 21st Dec 2009 23:40
I minor correction. It is .html rather than .php Who knows it might redirect anyway. FPSC Downloads

It is in the list of commands (a little more than half way down) and is stated thusly:


* Added new PLAYERDROPCURRENT action so only currently selected gun will be dropped (if used in weapon script)


-----------------------------------------------
OliveTreeGames
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 22nd Dec 2009 16:42 Edited at: 22nd Dec 2009 16:57
Quote: " FPSC Downloads"

OH, Okay.

I was looking at the list in the 1st post of the v116 thread here in the forums, and it is not the same.

I guess I should go get this now that it is an upgrade and not beta anymore.

Thanks

Edit
Quote: "* Added thick black border to the RAWTEXT FPI feature"

I see this mention of RAWTEXT, but I don't see anything about FPGCRAWTEXT.

Where did you find that?

I am just trying to figure out how I keep missing the release of new actions and conditions until they are old news.

   Conjured Entertainment

 WARNING: Intense Madness
Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 22nd Dec 2009 18:48 Edited at: 22nd Dec 2009 18:52
Quote: "Quote: "* Added thick black border to the RAWTEXT FPI feature"

I see this mention of RAWTEXT, but I don't see anything about FPGCRAWTEXT.

Where did you find that?"


I was confused at first with the reference to "RAWTEXT FPI" feature. I first thought there was an fpi script called by that name; but, there isn't. I then had no clue as to what was going on. As you know I have been working on a mod and it was in Lee's source code that I came across the 'RAWTEXT FPI' commands. I believe he was just making a general reference to the command which is actually FPGCRAWTEXT.

The "thick black border" is done automatically and there is no choice in the matter. However, since my mod (RPG Mod) has a lot of text drawn to the screen I can attest to the fact that having a border drawn around it is a great addition. In fact I am in the process of allowing a choice to have the border drawn around most of the RPG Mod text or not.

-----------------------------------------------
OliveTreeGames
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 22nd Dec 2009 22:38
Quote: "As you know I have been working on a mod and it was in Lee's source code that I came across the 'RAWTEXT FPI' commands. "

The source code, of course.
How stupid of me to forget the v116 release meant new source.
I need to upgrade my DBP and get to work on examining that source too.

Thanks Flatlander

   Conjured Entertainment

 WARNING: Intense Madness
Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 22nd Dec 2009 23:57
CE, you're far from stupid.

It's hard to keep up with everything.

-----------------------------------------------
OliveTreeGames
PW Productions
16
Years of Service
User Offline
Joined: 13th Mar 2009
Location: sitting in a chair.
Posted: 26th Dec 2009 06:32
Thanks for the info Flatlander, that will be very useful

Off-topic, so, it's practically FPGC now? It doesn't roll as much as FPSC. Probably cuz we're more used to FPSC. How come they didn't announce it?

Flatlander
FPSC Tool Maker
18
Years of Service
User Offline
Joined: 22nd Jan 2007
Location: The Flatlands
Posted: 27th Dec 2009 21:25
It's not official yet and it's probably a long way before having FPGC available. I am only guessing but I hope that Lee is working on the FPSC migration stuff and hopefully we will see some of that in the next beta. [Keeping fingers crossed.]

He also has to integrate the new editor into DBPro when JohnY is finished with the new editor.

-----------------------------------------------
OliveTreeGames
Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 28th Dec 2009 00:49 Edited at: 28th Dec 2009 00:50
Quote: "As you know I have been working on a mod and it was in Lee's source code that I came across the 'RAWTEXT FPI' commands. I believe he was just making a general reference to the command which is actually FPGCRAWTEXT."

I just went and looked at the DBPro Upgrade, which is 7.4
I also saw the extras (FPSC Source Code) but it is for v115, not v116.
Is the source code for v116 somewhere else?

I guess I needed that DBP upgrade to 7.4 since I was running v1.063

   Conjured Entertainment

 WARNING: Intense Madness
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 28th Dec 2009 02:11
Quote: "I just went and looked at the DBPro Upgrade, which is 7.4
I also saw the extras (FPSC Source Code) but it is for v115, not v116.
Is the source code for v116 somewhere else?

I guess I needed that DBP upgrade to 7.4 since I was running v1.063"


Comes with the extras of U7.5

Old But Still Kickin
17
Years of Service
User Offline
Joined: 29th Feb 2008
Location: U.S.A.
Posted: 28th Dec 2009 03:46 Edited at: 28th Dec 2009 03:52
from what I can figure out just using hudtext= works with all versions

bad thing is I can't get the font to change colors
I do know that the color can be changed because when you run Preview from the build menu you will see text coloring used.

Never give up trying. Just try it another way that works for you.
xplosys
19
Years of Service
User Offline
Joined: 5th Jan 2006
Playing: FPSC Multiplayer Games
Posted: 28th Dec 2009 05:11 Edited at: 28th Dec 2009 05:12
The color should be set using the RGB values...

Quote: "fpgcrawtextr=255,fpgcrawtextg=128,fpgcrawtextb=128"


These are new commands and I don't think you can use this in versions before 1.16 though.

Brian.

Old But Still Kickin
17
Years of Service
User Offline
Joined: 29th Feb 2008
Location: U.S.A.
Posted: 28th Dec 2009 08:03
Well...

Version 1 has this in the original setuplevel.fpi

hudred=128,hudgreen=0,hudblue=0

but they refer to hudimage

maybe it's a global command I need to look for...hmmmm

Never give up trying. Just try it another way that works for you.
FPSCgamerguy
User Banned
Posted: 30th Dec 2009 20:58
Is there a script where all of your weapons get deleted?
GreenDixy
16
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 9th Feb 2010 19:50
just wondering for the script



is there a way to get it to only display once?

===================
No life, Lots of love, 2 Kids, God save me LOL
GreenDixy
16
Years of Service
User Offline
Joined: 24th Jul 2008
Location: Toronto
Posted: 9th Feb 2010 20:15
Figured it out sorry for the post





===================
No life, Lots of love, 2 Kids, God save me LOL
The Storyteller 01
16
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 23rd May 2010 19:01 Edited at: 25th May 2010 20:39
I tried to put a longer text in 2 or more lines but it doesnt work to make it appear as a neat rectangular block in the middle of the screen.

I tried to create 2 single lines on different heights but that didn't work too:


Are there any secrets to manage this?

EDIT:

I discovered a new weirdness: When taking screenshots it doesnt capture the text although it works ingame

In case you find my grammar and spelling weird ---> native German speaker ^^
Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 26th May 2010 10:53
Quote: "I discovered a new weirdness: When taking screenshots it doesnt capture the text although it works ingame"


Yeah thats because the text is drawn directly to the buffer and the camera can't actually see the text. This is why the huds are not in pictures.

The Storyteller 01
16
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 26th May 2010 12:55
Funny ennough the text was displayed when I recorded a game using WeGame

In case you find my grammar and spelling weird ---> native German speaker ^^
Norion
14
Years of Service
User Offline
Joined: 14th Jun 2010
Location: The Netherlands.
Posted: 14th Jun 2010 17:39
WOW this is great thanks dude
VBTCH4020
14
Years of Service
User Offline
Joined: 24th Jun 2010
Location:
Posted: 24th Jun 2010 23:57
Can fpgcrawtext be used for multiple items like when a player approaches a person a second time having different text display?
THEpackrat
15
Years of Service
User Offline
Joined: 1st Jan 2010
Location:
Posted: 28th Jul 2010 03:48
First thanks to all the ppl willing to help noobs.
Now, I copied the snippet to notebook and attached the file to the entities' AI Main , tested it and nothing happened....What did I do wrong??

Login to post a reply

Server time is: 2025-06-01 11:13:35
Your offset time is: 2025-06-01 11:13:35