MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
webhead [Tutor]
ayyappa [Downl]
Maciusiak [Downl]
sebastian171 [Downl]

4 Members and 17 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Sunday, Oct. 12th
MODSonair 149 Live
Friday, Oct. 10th
Far Cry 2 Money, Diamonds, and Blood Trailer
Friday, Oct. 10th
MODSonair Episode 148
Thursday, Oct. 9th
Multiplayer Game Modes Interview
Sunday, Oct. 5th
Help MODSonline Heal Kids and Fight Cancer!
Latest Poll
Would you pay for mod tools?
I would pay a one time fee for mod tools for my favorite title 13%
I would pay a monthly/yearly subsrciption fee for mod tools for my favorite title 0%
I already paid for the game - Tools should come bundled because I am just fixing what the developers broke 59%
100% definitely NOT! 22%
I haven't seen a game yet that wasn't 100% perfect when the developers released it 4%
Games are the devil! 2%
Read More...
10 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
making a new teture!!
CoD 4 Level Desi.. Posts: (2) Views: (13) by WHISKYMAN
xmodel works, but tells me image file is missi...
CoD 4 Level Desi.. Posts: (11) Views: (51) by mjrtoo
Radar Pic. HOW TO MAKE IT....?
CoD 4 Level Desi.. Posts: (2) Views: (15) by fireball1
writing a word in radian without wall XD!!
CoD 4 Level Desi.. Posts: (1) Views: (12) by killerciao
Extra Life - Save Kids Quake 4 Mods for Dummies
Forums
MODSonline.com Forums

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 4
Category: CoD 4 Scripting
Scripting and coding with Call of Duty 4.
Moderators: foyleman, rEdrUmMDK, Foxhound, Rasta, StrYdeR, The_Caretaker, batistablr, playername, Welshy
Latest Posts
Subscribed Posts
Search
Restricted Access Restricted Access subscribe
Author Topic: localized strings
mclark
General Member
Since: Dec 6, 2007
Posts: 26
Last: Jul 31, 2008
[view latest posts]
Level 2
Category: CoD 4 Scripting
Posted: Sunday, Jun. 8, 2008 07:54 pm
I'm alittle confused about the setObjectiveText function in the function "onStartGameType" for each gametype. Some of the references defined for TDM are"

REFERENCE OBJ_WAR
REFERENCE OBJ_WAR_SCORE
REFERENCE OBJ_WAR_HINT

...but the setObjectiveText function calls these references:

&"OBJECTIVES_WAR"
&"OBJECTIVES_WAR_SCORE"
&"OBJECTIVES_WAR_HINT"

and the function doesn't remove "OBJECTIVES" and define "OBJ" as shown:

setObjectiveText( team, text )
{
game["strings"]["objective_"+team] = text;
precacheString( text );
}



The_Caretaker
Preferred Member
Since: Jun 8, 2004
Posts: 11559
Last: Oct 4, 2008
[view latest posts]
Level 10
Forum Moderator
Category: CoD 4 Scripting
Posted: Monday, Jun. 9, 2008 04:37 pm
the & sign is a pointer, so probably &OBJECTIVE_WAR points to OBJ_WAR in the .str file (that's not as simple as a pointer works, but basically that is what it does).
mclark
General Member
Since: Dec 6, 2007
Posts: 26
Last: Jul 31, 2008
[view latest posts]
Level 2
Category: CoD 4 Scripting
Posted: Monday, Jun. 9, 2008 05:48 pm
I think i figured it out....

The pointer &"OBJECTIVES_WAR" actually defines the filename objectives.str and string reference WAR.


In file objectives.str this is defined:
REFERENCE WAR
LANG_ENGLISH "Gain points by eliminating enemy players."

playername
Preferred Member
Since: Aug 24, 2006
Posts: 688
Last: Oct 5, 2008
[view latest posts]
Level 6
Forum Moderator
Category: CoD 4 Scripting
Posted: Monday, Jun. 16, 2008 02:47 pm
Mclark you got it. This is how the files work.
To call on the string, it would be like this.
iprintln(&"STRINGS_PLAYERNAME");

The .str file will be called strings.str and then inside would be a reference such as this:

REFERENCE PLAYERNAME
LANG_ENGLISH "Playername"

Hope this clears you up.
Few tips for coding.
1. Keep the script as short as possable.
2. Don't use comments unless you HAVE to point something out.
3. Don't over complicate the script, keep it orgainized and easy to read.

These help you find simple errors and makes it easy to make changes.
NovemberDobby
General Member
Since: Sep 17, 2006
Posts: 1628
Last: Oct 6, 2008
[view latest posts]
Level 8
Category: CoD 4 Scripting
Posted: Monday, Jun. 16, 2008 04:11 pm
Urgh, localised strings, hate dealing with 'em [tongue]
Restricted Access Restricted Access subscribe
MODSonline.com Forums : Call of Duty 4 : CoD 4 Scripting
All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
MODSonline Subscriptions
Partners
The Firing Box
Frag Universe
XoXide
modbase.be
Call of Duty Headquarters
Battle for Europe COD2
CODAddicts - Call of Duty News & Downloads
Ask About
Advertising
Friends
Great Gamer
After Life Gaming
Volcano
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 148
MODSonair Episode 147
MODSonair Episode 146
MODSonair Episode 145
MODSonair Episode 144
Next Show
The next MODSonair show will air LIVE on:
10/19/2008 11:00 EDT

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware