Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Rise of Nations > RoN-General > Info: scripting language
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!
31.Aug: `MOR` THIRD SEASON SIGN-UPS UNDERWAY
26.Aug: EMERGES AS THE WINNER
20.Aug: OH SO LOVABLE
CivGroups
Rise of Nations Multiplayer (64): Not a Member - Join
Apolyton Storywriters' Guild (56): Not a Member - Join

bottom of page
  
Author
Thread   
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
Vushum is offline Vushum
Chieftain
Hell
Oct 2002
time: 05:23
  Old Post 30-10-2002 00:29
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Browse Apolyton AD-FREE

Tell me about the scenario editor and triggers please. I've been wanting to know this for ages!

MarkG is offline MarkG
Grand Lord of Apolyton, Owner of all this land as far as the eye can see

Donate to the Red Cross
Macedonia, Greece
Jan 1970
time: 07:23
  Old Post 30-10-2002 03:18 Visit MarkG<br><img src=/forums/images/admin-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Put an end to popups!

the scenario editor is not included in the preview betas.
there is a whole scripting language with functions, variables, and everything that will give lots of powers to scenario makers
triggers are like writing an if statement...

MarkG is offline MarkG
Grand Lord of Apolyton, Owner of all this land as far as the eye can see

Donate to the Red Cross
Macedonia, Greece
Jan 1970
time: 07:23
  Old Post 30-10-2002 03:30 Visit MarkG<br><img src=/forums/images/admin-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Get a bigger avatar today!

i found an example of a trigger from the world conquest campaign

code:
trigger (num_type(PLAYER1, "general") == 0) { player1_timer = time_sec() + general_defeat; if (player2_timer < 0) { print_game_msg("Your general has been killed! Your army will disintegrate in " + general_defeat + "seconds."); } }

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:23
  Old Post 30-10-2002 04:15 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Got spare money?

quote:
Originally posted by MarkG
i found an example of a trigger from the world conquest campaign
code:
trigger (num_type(PLAYER1, "general") == 0) { player1_timer = time_sec() + general_defeat; if (player2_timer < 0) { print_game_msg("Your general has been killed! Your army will disintegrate in " + general_defeat + "seconds."); } }

Cool.

The whole RT thing will make timings a whole new game in scripting me thinks, but it looks very good. And in-script message text is a big plus on SLIC

MarkG is offline MarkG
Grand Lord of Apolyton, Owner of all this land as far as the eye can see

Donate to the Red Cross
Macedonia, Greece
Jan 1970
time: 07:23
  Old Post 30-10-2002 14:21 Visit MarkG<br><img src=/forums/images/admin-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Increase Your PM Length

i hope bhg doesnt mind

here is the 1st tutorial script

code:
/******************************************/ /*************RISE OF NATIONS**************/ /***************TUTORIAL ONE***************/ /**************Big Huge Games**************/ /********Scripted by: Joshua Mitnick*******/ /*******Storyboarded by: Doug Kaufman******/ /***************July 25, 2002**************/ /******************************************/ / ************************************************** ***** Scenario 1 - Boudicea vs. the Romans Map: A Briton village, bounded by mountains and forests. A Roman camp (obs tower and maybe a barracks) nearby. Setup: Several combat units on both sides. The Britons outnumber the Romans. The Britons have a scout, multiple slingers, and a few each of bowmen and hoplites. A Boudicea unit is in the lower left. ************************************************** ******/ include "scripts.bhh" scenario { // nations labels { HUMAN = 1, COMPUTER = 2, } labels { FLAG_X = 27, FLAG_Y = 50, FLAG2_X = 25, FLAG2_Y = 33, BONUS_LEGIONS_X = 35, BONUS_LEGIONS_Y = 28, ARMY_CREATE_X = 35, ARMY_CREATE_Y = 28, ATTACK_TO_X = 37, ATTACK_TO_Y = 30, } static boudicea_id = 19; // HACK!! find_unit(HUMAN, "BOUDICEAN"); static briton_id = find_city_id("Briton"); static Briton_X = object_position_x (HUMAN, briton_id); static Briton_Y = object_position_y (HUMAN, briton_id); static Legions_create_X = Briton_X; static Legions_create_Y = Briton_Y; static barracks_id = find_build(COMPUTER, "barracks"); static R_Barracks_X = object_position_x (COMPUTER, barracks_id); static R_Barracks_Y = object_position_y (COMPUTER, barracks_id); static lookout_id = find_build( COMPUTER, "lookout" ); static lookout_x = object_position_x( COMPUTER, lookout_id ); static lookout_y = object_position_y( COMPUTER, lookout_id ); static tower_destroyed = false; static barracks_destroyed = false; static army_destroyed = false; static objective_delay = 60; run_once { bubble_text_hide(); set_explored(HUMAN, ( (R_Barracks_X + lookout_x ) / 2) , ( ( R_Barracks_Y + lookout_y ) / 2 ), 10); disable_all_triggers(); set_unique_unit( "BOUDICEAN", "Boudicea" ); set_object_type_max_health( "barracks", 250 ); set_object_type_max_health( "lookout", 125 ); disable_type("Citizen"); set_music_volume(50); enable_trigger("Global"); enable_trigger("Start"); set_timer("progress_check",objective_delay ); } trigger Objective_Reminder( timer_expired("progress_check") && sound_finished() ) { clear_all_arrows(); draw_screen_arrow_line(200, 0, 200, 90, 10 ); play_sound("objective.wav"); if(objective_delay < 300) { objective_delay = objective_delay * 2; } else { objective_delay = 300; } set_timer("progress_check", objective_delay); enable_trigger("Objective_Reminder"); } trigger Start () { //WAV: We must remove the Romans from the lands of Briton. Lead Boudecia back to the city // where we will muster our troops to drive the Romans out. play_sound ("boudicea.wav"); enable_trigger("Select_a_unit"); enable_trigger("Select_Boudicea"); enable_trigger("Objective_Reminder"); set_timer("progress_check",objective_delay); } trigger Select_a_unit( sound_finished() ) { //WAV: "You must select a unit before you can give it orders. Move the mouse over Boudicea and left click to 'select' her." add_objective("Left click on Boudicea.", "Select_boudicea", "select_boudicea.wav"); play_objective_sound("Select_boudicea"); enable_trigger ("Select_Boudicea"); enable_trigger ("Ping_Boudicea"); set_timer("progress_check",objective_delay); } trigger Select_Boudicea( object_selected(HUMAN, boudicea_id ) ) { disable_trigger ("Ping_Boudicea"); disable_trigger("Select_a_unit"); objective_complete("Select_boudicea"); // WAV: "Well done. You can be sure you have the right unit by looking at the name of // the unit you've selected in the lower right panel. Now you can give Boudicea orders." play_sound("boudicea_selected.wav"); // draw arrow to unit display info unit_display_left = get_button_left("right_window"); unit_display_top = get_button_top("right_window"); draw_screen_arrow_line( unit_display_left - 100, unit_display_top - 100, unit_display_left, unit_display_top, 0 ); enable_trigger ("Move_a_unit"); enable_trigger ("Deselect_Boudicea"); set_timer("progress_check",objective_delay); } trigger Deselect_Boudicea( !object_selected(HUMAN, boudicea_id )) { play_sound ("lostboud.wav"); //WAV: Left-clicking on the map will clear all selections. To regain control of Boudicea, left click on her, then // right click where you want her to go.***/ set_timer("progress_check",objective_delay); } trigger Ping_Boudicea( sound_finished () && !object_selected(HUMAN, boudicea_id ) ) { ping_object (1, 1, 1, boudicea_id); set_timer("progress_check",objective_delay); } trigger Move_a_unit( sound_finished () && object_selected(HUMAN, boudicea_id ) ) { clear_all_arrows(); add_objective("Select Boudicea and right click on the flag.", "Move_boudicea", "move_boudicea.wav"); play_objective_sound("Move_boudicea"); //WAV: "To move a unit, select it and then right-click on the map where you want it to go. // With Boudicea selected, move her toward the flag in the upper right. add_flag (FLAG_X, FLAG_Y); enable_trigger("Flag"); enable_trigger("reveal_flag"); set_timer("progress_check",objective_delay); } trigger reveal_flag(sound_finished() ) { set_explored( HUMAN, FLAG_X, FLAG_Y, 5 ); } trigger Flag(object_near (HUMAN, boudicea_id, FLAG_X, FLAG_Y, 2)) { disable_trigger("reveal_flag"); objective_complete("Move_boudicea"); clear_flags (); play_sound ("at_flag.wav"); // WAV: "Very good. Now we'll guide your boudicea back to the village and rally the troops." disable_trigger("Deselect_boudicea"); enable_trigger ("Learn_scroll"); set_timer("progress_check",objective_delay); } trigger Learn_scroll (sound_finished ()) { // WAV: Briton is off the screen to the upper right. To see off the screen, move the mouse cursor to the edge of the screen and a little beyond. // This is called scrolling. Scroll to find Briton in the upper right now. add_objective("Locate Briton by scrolling to the upper right.", "Find_briton", "learnscroll.wav"); draw_screen_arrow_line (get_screen_width() - 100, 100, get_screen_width(), 0, 10 ); play_objective_sound("Find_briton"); set_timer("progress_check",objective_delay); enable_trigger("camera_over_village"); } trigger camera_over_village( is_on_screen (object_position_x(HUMAN, BRITON_ID)-1, object_position_y(HUMAN, BRITON_ID)-1)){ clear_all_arrows(); objective_complete("Find_briton"); // wav: Very good. You found the city of Briton. Now, right click to move boudicea to the flag outside the village. add_objective("Right click to move your unit to the flag.", "Move_to_briton", "move_b_village.wav"); add_flag (FLAG2_X, FLAG2_Y); enable_trigger("Deselect_boudicea"); play_objective_sound("Move_to_briton"); enable_trigger("Knows_moving"); } trigger Knows_moving (object_near_build (HUMAN, boudicea_id, HUMAN, BRITON_ID, 8)) { objective_complete("Move_to_briton"); clear_flags(); play_sound ("boudicearejoins.wav"); //WAV: "Good work! You've successfully guided Boudica back to Briton so we can start rallying our troops. But before we attack, we must first we must find our hated foe." disable_all_triggers (); disable_trigger("Deselect_boudicea"); enable_trigger ("Global"); enable_trigger ("Learn_zoom"); enable_trigger ("Objective_Reminder"); set_timer("progress_check",objective_delay); } trigger Learn_zoom (sound_finished ()) { scrolling_lock (); /***WAV: "To see more of the map and have a better chance of locating the Romans," "zoom out by rolling the mousewheel backward (or pressing the Page Up key twice)."***/ add_objective("Roll the mousewheel back or press PageUp twice to zoom out.", "zoom_out", "learnzoom.wav"); play_objective_sound("zoom_out"); enable_trigger ("Zoom_out"); set_timer("progress_check",objective_delay); } trigger Zoom_out (is_zoomed_out ()) { scrolling_unlock (); objective_complete("zoom_out"); add_objective("Locate the Roman camp by scrolling the map to the bottom right.", "find_camp", "zoomlearned.wav"); play_objective_sound("find_camp"); //WAV: Well done. Now that you know how to zoom out, it will be easier //to locate the Roman camp. Scroll to the bottom right until you find it. draw_screen_arrow_line (get_screen_width() - 100, get_screen_height() - 100, get_screen_width(), get_screen_height(), 10 ); enable_trigger ("Find_camp"); } trigger Find_camp (is_on_screen (R_Barracks_X+10, R_Barracks_Y+10)) { clear_all_arrows(); //ping_object (1, 1, 2, barracks_id); mid_x = ( R_Barracks_X + lookout_x ) / 2; mid_y = ( R_Barracks_Y + lookout_y ) / 2; ping(1, 1, mid_x, mid_y ); add_flag( mid_x, mid_y ); objective_complete("find_camp"); play_sound ("foundcamp.wav"); //WAV: "Excellent, you've found the Roman camp. Now let's take a" //"closer look at their defenses." enable_trigger ("Mouseover"); set_timer("progress_check",objective_delay); } trigger Mouseover (sound_finished ()) { clear_flags(); ping_object (1, 1, 2, barracks_id); //WAV: Moving the mouse over anything in the game will show you the help text in the lower // left corner. Move your mouse over the Roman Barracks. add_objective("Move your mouse over the Roman barracks", "over_barracks", "mouseover.wav" ); play_objective_sound("over_barracks"); enable_trigger("Over_tower"); enable_trigger("Over_barracks"); set_timer("progress_check",objective_delay); } trigger Over_tower( sound_finished() && get_object_type_at_mouse (COMPUTER, "Lookout") ) { play_sound("over_tower.wav"); //WAV: You have highlighted the roman tower. The barracks are just below it and to the right. set_timer("progress_check",objective_delay); } trigger Over_barracks( sound_finished() && get_object_type_at_mouse (COMPUTER, "Barracks") ) { objective_complete("over_barracks"); disable_trigger("Over_tower"); play_sound ("overbarracks.wav"); /***WAV: "Notice the help text in the lower left--it says this building is used to produce troops. We'd better destroy it quickly! Let's get our units organized and attack!"***/ enable_trigger("scouting_complete"); } trigger scouting_complete( sound_finished() ) { play_sound("knowrposition.wav"); //WAV: Excellent! Now you know a lot about the Roman position. Let's get our units organized, and attack. enable_trigger("Attack_the_Romans"); set_timer("progress_check", objective_delay); } trigger Attack_the_Romans (sound_finished ()) { center_camera_on (HUMAN, find_military (HUMAN)); add_objective("Select all troops with a drag box.", "all_troops", "multiselect2.wav"); play_objective_sound("all_troops"); /***WAV: "You can select your whole army at once with a drag box." "Hold the mouse near your units, left-click, then drag the mouse "to create a box around all your troops."***/ enable_trigger ("All_troops"); enable_trigger ("Not_all_troops"); set_timer("progress_check",objective_delay); } trigger Not_all_troops ( (num_unit_selected (HUMAN) > 1) && (num_unit_selected (HUMAN) < num_military_units (HUMAN) )) { play_sound ("notall.wav"); /***WAV: You selected some, but not all, of your troops. Try again, and make a bigger box.***/ set_timer("progress_check",objective_delay); } trigger All_troops (all_military_selected (HUMAN)) { disable_trigger ("Not_all_troops"); objective_complete("all_troops"); add_objective("Right-click to move your troops into the Roman camp.","destroy_camp", "alltroops.wav"); play_objective_sound("destroy_camp"); mid_x = ( R_Barracks_X + lookout_x ) / 2; mid_y = ( R_Barracks_Y + lookout_y ) / 2; ping(1, 1, mid_x, mid_y ); add_flag( mid_x, mid_y ); /***WAV: "Good work. You successfully selected all of your troops. Now send" "your troops toward the Roman position. If they stop close to an enemy building" "or unit, they'll attack automatically. Destroy the Roman camp. We'll teach them" "to march into our town!"***/ enable_trigger ("Deselect_army"); set_timer("deselect_timer", 1 ); enable_trigger("Destroy_camp"); set_timer("progress_check",objective_delay); } trigger Global (have_fought (HUMAN, COMPUTER)) { clear_flags (); clear_all_arrows (); scrolling_unlock (); create_unit(COMPUTER, R_Barracks_X - 4, R_Barracks_Y, "Legions", 2); if (is_trigger_enabled ("Destroy_camp")) { play_sound ("attackbegun.wav"); //WAV: "The attack is begun! To attack specific targets, select the attacking //unit and right click on an enemy. If you want a better view of the action, // you can zoom in by rolling the mouse wheel forward or pressing the page down key multiple times. enable_trigger ("See_health"); enable_trigger ("Deselect_army"); } else { play_sound ("earlyattack.wav"); /***WAV: Good work General. Apparently you don't need any help in order to conquer the Romans. Good luck!***/ clear_objectives(); disable_all_triggers (); enable_trigger ("Destroy_camp"); } objective_complete("destroy_camp"); add_objective("Destroy Roman army", "destroy_army", "alltroops.wav" ); add_objective("Destroy Roman barracks", "destroy_barracks", "alltroops.wav"); add_objective("Destroy Roman lookout", "destroy_lookout", "alltroops.wav"); enable_trigger ("Destroy_tower"); enable_trigger ("Destroy_barracks"); enable_trigger ("Destroy_army"); set_timer("progress_check",objective_delay); } trigger Deselect_army (sound_finished () && (num_unit_selected (HUMAN) == 0 ) && timer_expired("deselect_timer") ) { play_sound ("lostarmy.wav"); /***WAV: You have troops that are not selected who are not attacking. Select them with a left click or drag box and get them in the fight!***/ enable_trigger("Deselect_army"); set_timer("deselect_timer", 10); } trigger See_health (sound_finished ()) { play_sound ("damage.wav"); /***WAV: As the fight progresses, you can see units and buildings taking damage. Each selected unit and building has a green bar above it when it's at full strength. As they are hit by the enemy, this bar shrinks and becomes yellow and then red. When the health bar is all gone, the unit or building is destroyed.***/ set_timer("progress_check",objective_delay); } trigger Destroy_tower (building_type_destroyed (COMPUTER, "Lookout")) { tower_destroyed = true; objective_complete("destroy_lookout"); } trigger Destroy_barracks (building_type_destroyed (COMPUTER, "Barracks")) { barracks_destroyed = true; objective_complete("destroy_barracks"); } trigger Destroy_army( num_military_units(COMPUTER) < 1 ) { army_destroyed = true; objective_complete("destroy_army"); } trigger Destroy_camp (tower_destroyed && barracks_destroyed && army_destroyed) { disable_all_triggers (); play_sound ("congrats.wav"); /***WAV: Congratulations! You've leveled the Roman camp. But it won't be long before" "they'll be back in strength. We'd best be ready.***/ enable_trigger ("Bonus"); disable_trigger("Objective_Reminder"); } // ================================================== ======== //Putting it all together=================================== trigger Bonus (sound_finished ()) { set_timer ("Help", 4); Legions = create_unit (COMPUTER, BONUS_LEGIONS_X, BONUS_LEGIONS_Y, "Legions", 1); unit_attack_order(COMPUTER, Legions, HUMAN, BRITON_ID); zoom_in_on(HUMAN, BRITON_ID); enable_trigger ("Help_out"); enable_trigger ("The_end"); } trigger Help_out (timer_expired ("Help")) { /***WAV: The vile Romans have launched a sneak attack against Briton! We must come to her aid.***/ center_camera_on(HUMAN, find_military(HUMAN) ); add_objective("Briton is under attack! Right-click to move your troops to defend the city!", "sneak_attack", "sneakattack.wav"); play_objective_sound("sneak_attack"); enable_trigger ("Reinforce"); enable_trigger("Deselect_army"); } trigger Reinforce (num_military_units (HUMAN) < 1) { create_unit (HUMAN, ARMY_CREATE_X, ARMY_CREATE_Y, "Hoplites", 7); for (i = 0; i < num_military_units (HUMAN); i++) { ID = find_military (HUMAN); unit_attack_to_order (HUMAN, ID, ATTACK_TO_X, ATTACK_TO_Y); } } trigger The_end (num_military_units (COMPUTER) < 1) { objective_complete("sneak_attack"); play_sound ("victory.wav"); /***WAV: Congratulations! You have fended off the evil Romans***/ enable_trigger("The_real_end"); } trigger The_real_end( sound_finished() ) { victory( HUMAN ); } // ================================================== ======== }

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:23
  Old Post 30-10-2002 14:54 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Increase the size of your Attachments

Thanks Markos

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:23
  Old Post 30-10-2002 23:21
Edit/Delete Message Reply w/Quote
#7 Report this post to a moderator
Lose 30 kilos (of popups)

You bet. Lots of new stuff to learn about! Thanks again Markos.

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:23
  Old Post 31-10-2002 21:01 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#8 Report this post to a moderator
Tired of ads?

Good stuff, thanks Markos

Very C-like language, from the looks of it - more so than CtP's SLIC anyway. That's good news for programmers () but might make things a bit harder to get into for non-programmers (). Let's hope there will be good newbie-friendly documentation...

Assuming there are sufficent functions and triggers (and this certainly looks promising), this could turn out to be a very powerful and versatile scripting language. Hats off to BHG

Vushum is offline Vushum
Chieftain
Hell
Oct 2002
time: 05:23
  Old Post 01-11-2002 00:06
Edit/Delete Message Reply w/Quote
#9 Report this post to a moderator
Suffering from ads?

Will the language be simplified so the people who can't read it can?

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:23
  Old Post 01-11-2002 01:12 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#10 Report this post to a moderator
Support Apolyton, buy Civilization 2

Pray for documentation

If not, I'm sure somebody who does figure it out pretty quick will write a helpful "How To" guide.

adaMada is offline adaMada
King
"The Iron" Stadium, Ubergorsk, Apolytonia (C3DG)
Mar 2000
time: 00:23
  Old Post 01-11-2002 01:33
Edit/Delete Message Reply w/Quote
#11 Report this post to a moderator
Support Apolyton buy from Amazon

WoW! That looks AWSOME!

I've never actually worked on game modding/scn making much, but I might have to with such a wonderful looking language. Locutus is right, though -- being a C programmer, I'm thrilled, but non-programmers might not have it quite so easy.

-- adaMada

tniem is offline tniem
King
Hope College
Apr 2000
time: 00:23
  Old Post 01-11-2002 06:35
Edit/Delete Message Reply w/Quote
#12 Report this post to a moderator
Support Apolyton, buy Civilization 2

Wow! Allowing full scripting language for scenarios is incredibly powerful and fantastic for the game and the community.

Does anyone know the following questions:

Is there going to be a scenario editor that is easier than a scripting language?

Can we edit AI strategies with the scripting language?

Viking Berserk is offline Viking Berserk
Chieftain
of Hammerfest
Nov 2002
time: 06:23
  Old Post 04-11-2002 14:45 Visit Viking Berserk's homepage!
Edit/Delete Message Reply w/Quote
#13 Report this post to a moderator
Support Apolyton, buy Civilization 2

cant scenarios be made the old editor way???
i dont even understand that kind of scripts.

MarkG is offline MarkG
Grand Lord of Apolyton, Owner of all this land as far as the eye can see

Donate to the Red Cross
Macedonia, Greece
Jan 1970
time: 07:23
  Old Post 04-11-2002 14:50 Visit MarkG<br><img src=/forums/images/admin-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#14 Report this post to a moderator
Support Apolyton, buy Civilization III: Complete

scripting is for doing things like triggering events, etc
civ editing, city placement, etc will have nothing to with the scripting

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:23
  Old Post 04-11-2002 23:11
Edit/Delete Message Reply w/Quote
#15 Report this post to a moderator
Help yourself to an AD-FREE life

Yes, Tim Train confirmed that there will be the standard sort of scenario editor.

I think, but am not sure about this, that there may be some sort of intermediate scripting editor which will simplify writing triggers.

Viking Berserk is offline Viking Berserk
Chieftain
of Hammerfest
Nov 2002
time: 06:23
  Old Post 08-11-2002 20:00 Visit Viking Berserk's homepage!
Edit/Delete Message Reply w/Quote
#16 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

what about the old way of triggering???

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:23
  Old Post 08-11-2002 23:11
Edit/Delete Message Reply w/Quote
#17 Report this post to a moderator
Put an end to popups!

What do you mean "the old way"? What game are you talking about? (Civ2?) If not, could you give an example of a trigger?

Vushum is offline Vushum
Chieftain
Hell
Oct 2002
time: 05:23
  Old Post 08-11-2002 23:50
Edit/Delete Message Reply w/Quote
#18 Report this post to a moderator
Suffering from ads?

I thinkk maybe AoK or SWGB, that sort of thing, just with more options. All we would like to know BHG- Will it be simplified or will have to wait for a patch or for fellow players to make one?

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:23
  Old Post 09-11-2002 05:11 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#19 Report this post to a moderator
Tired of ads?

The AoK system was quite good, but it could have been improved significantly by adding loops and global variables to act as yes/no things, rather than being forced to use unit existance or something.

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:23
  Old Post 18-01-2003 19:33
Edit/Delete Message Reply w/Quote
#20 Report this post to a moderator
Support Apolyton

Obsidian has just posted a very lengthy account of the recent Fanstock event at BHG's headquarters:

http://ron.heavengames.com/press/ev...tock/day1.shtml

Herer's the part that's relevent to this thread:

quote:


Scenario Editor

Now for the part all you scenario designers have been waiting for, the Scenario Editor. One of the first things you do when you start the editor is select your map size. This gives you a large square area to work with as the starting template for the map. On this square you can draw a rough outline of your map. This keeps you from having to draw the entire map out tile by tile when you are starting your work. Scott began by drawing out a rough version of the boot shape for the Italian peninsula. With a simple click, the entire map was generated to reflect what he had drawn. After the map was created, the process of adding things like mountains, forests, cities and units to the scenario involved simply selecting what you wanted and clicking on where it should go.

[Scott Lewis, the Scenarios and tools programmer] created the city of Rome and gave it some citizens as well as a few Praetorian Guards for defense. We then went to the north and created a small city for the barbarians that we would be using to attack the city of Rome. It was here that Scott showed us the scripting engine that the game uses for its Scenarios. I’ll start by saying that when I saw what this thing was capable of, my jaw dropped.[My emph] The scripting language in and of itself was structured very similar to C++ or javascript. There are of course some proprietary commands that are specific to the game, but the syntax is very similar so anyone familiar with those languages should feel right at home. Scott wrote a small script that would cause the enemy city to the north to select an idle set of troops every few seconds and send them down to attack the city of Rome.

This is the part where the game really impressed me. You could set actual breakpoints in your scripts to verify that the script was executing as designed. “Why did that guy go over there? That’s not what I wanted him to do” Just set the break point in the script and you can start seeing where things went wrong. They have also included the ability to reference other scripts in your current script. So if I wrote an AI script that improved on the way the computer organized forces for attacks, all you would need to do is provide the path to the location of my script and you would have all the functionality available to you. About the only thing that is missing from the editor at this point is an immediate window where you can check the values of variables on the fly and intellesense. For those unfamiliar with intellisense, it is a nifty little feature where the editing screen gives you information about the command you are typing. It really helps in keeping all those function calls straight and free of errors. When I mentioned this to Scott he said that it was actually something they were considering adding.



It just keeps getting better, eh.

HuangShang is offline HuangShang
King
USA, SoCal, L.A.
Jul 2002
time: 21:23
  Old Post 19-01-2003 00:24
Edit/Delete Message Reply w/Quote
#21 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

didnt nVidia come out w/ a new language for games?
i dont know how this all works but i read news about that
i understand the senario editor is very important in any game, but EE and starcraft definately had some of the best

Locutus is offline Locutus
ACS CTP1/2 Manager & Civ4 Co-Manager
Hengelo, The Netherlands
Nov 1999
time: 06:23
  Old Post 19-01-2003 05:27 Visit Locutus<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#22 Report this post to a moderator
Remove this text

Sounds VERY, VERY impressive... MrOgre but especially Mike Breitkreutz could learn something from this...

WarpStorm is offline WarpStorm
King
Right down the road
Nov 2001
time: 00:23
  Old Post 19-01-2003 21:39
Edit/Delete Message Reply w/Quote
#23 Report this post to a moderator
Help yourself to an AD-FREE life

This is awesome. It looks like they opened up total control. Thanks Brian, Jason, Jason, and co.

To give Mike B some credit, he didn't design the original Civ3 engine or editor. Adding something like this after the fact will be much tougher than designing it in from the beginning.

St Leo is offline St Leo
King of Scenario League
Member of the Apolyton Social Democratic Party
Jul 2005
time: 00:23
  Old Post 22-01-2003 23:12 Visit St Leo<br><img src=/forums/images/staff-icon.gif>'s homepage!
Edit/Delete Message Reply w/Quote
#24 Report this post to a moderator
Avatar Enlargement: We've got the solution

didnt nVidia come out w/ a new language for games?

That has to do with game graphics and not the real meat. Most games are still bein programmed in C++ and no replacement is likely to appear.

WarpStorm is offline WarpStorm
King
Right down the road
Nov 2001
time: 00:23
  Old Post 23-01-2003 02:34
Edit/Delete Message Reply w/Quote
#25 Report this post to a moderator
Put an end to popups!

The only other language I've seen a mainstream game done in lately is Python. Even then the time intensive portions were written in C++.

Amesjustin is offline Amesjustin
Warlord
of nothing
Feb 2002
time: 21:23
  Old Post 04-02-2003 00:26 Visit Amesjustin's homepage!
Edit/Delete Message Reply w/Quote
#26 Report this post to a moderator
Support Apolyton, buy Galactic Civilizations

I CANNOT WAIT! I haven't really been been following RON all that much, and am surprised by this. As a VFP/VB/C#/HTML/SQL developer, this kind of open-source coding in a game of this magnitude REALLY appeals to me. Just imagine the scenarios everyone will be making....

Peter Triggs is offline Peter Triggs
Prince
Gone Fishin, Canada
Jan 2000
time: 05:23
  Old Post 29-03-2003 04:28
Edit/Delete Message Reply w/Quote
#27 Report this post to a moderator
Support Apolyton, buy Alpha Centauri

This isn't really about scripting, but is more info on RoN's modifiability. Rohag posted on the WebQuad forums:

http://www.webquad.com/forums/index...=ST&f=23&t=1285

quote:

One of the reasons I became interested in RoN is that the game’s developer, Big Huge Games of Baltimore, Maryland USA, seems to be relatively open to discussing the ideas behind the game and the design process.

I gather that in the process of design and coding developers have a number of in-game “tools” they use to modify, tweak and debug progressive builds of a game. Sometime last summer (?) the BHG design team decided to leave some of these tools in RoN for fans to use after release. Yes, there will be an editor, but these “sandbox” features (I’m using the term Brian Reynolds used) can be accessed directly from game setup.

You can set up a single-player “game” with all the players “human” – you can control everyone with or without a supporting national-level AI (unit-level AI remains). All you need do is click on a unit or building and you take control of that nation; you can repeatedly switch among allies and enemies. I took advantage of this in the Preview Beta to set up the Nuke Effects screens: I chose two human-controlled nations in the Modern Age without national-level AI support, developed one to attack and one to be attacked, advanced the target nation to the Information Age, took the "before" shot and saved the game, switched control to the attacker, sent over the Modern Age nuke, took the screenshot, reloaded the saved game, advanced the attacker to Information and developed ICBMs, attacked again and took the third screenshot.

After RoN is released I’m interested in using the editor and these sandbox features to set up some historical battles, with me controlling both sides. While paused I’ll give orders to both sides and then watch the action, trying out all sorts of maneuvers and what-ifs.

I would imagine if you’re really in for a single-player challenge, you could set up a game with several nations with national-level AI support for all. You could jump from nation to nation either helping the victors or the underdogs, perhaps your self-imposed goal being to keep every nation in the game until the Information age.

Well, these are pre-publication musings. I hope BHG retains all the sandbox features they now have. It was always fun in my days of cardboard counters and map gaming to play solitaire and set plan against plan.


The more tools, the better.

BTW: What, no arrays !

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:23
  Old Post 01-04-2003 01:50 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#28 Report this post to a moderator
Browse Apolyton AD-FREE

Woo yeah! Tools are great.

No arrays PATCH!!

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:23
  Old Post 01-04-2003 03:03 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#29 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

If you do maths, just imagine a matrix...

Bascially, arrays are variables that can store more than one value. Pretty much like a table. For example, in SLIC, the CtP/2 scripting language, you can have (one-dimensional) arrays that act like a row of a table, storing numbers for example.
In other languages they can store other variable types, strings, integers, etc.

One-D array with size 3:
defined as Array[3]


012


It was hoped that RoN scripting would allow multi-dimensional scripting, so that each array index (position in the array) would act as a row in itself, or in other words form a proper "table"

2D array with size 3,3
defined as: Array[3][3]




000102
101112
202122



So a string array defined:
array NewArray[];
NewArray[0] = "Hello "
NewArray[1] = "Tassandar"
NewArray[2] = "5000"

print(NewArray[0] + NewArray[1] + NewArray[2])

would give "Hello Tassandar5000"

But of course their use is far more flexible, because it allows you to access the indices within 'for' loops and such, so it has a distinct advantage over just using many variables, not to mention the lines/time spent defining and remembering what each variable would otherwise be.

eg.
for(i=0; i < 3; i ++){
print(NewArray[i])
}

would again bring out "Hello Tassandar5000"

Last edited by Immortal Wombat on 01-04-2003 at 03:11

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:23
  Old Post 01-04-2003 03:16 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#30 Report this post to a moderator
Remove this text

code:
static boudicea_id = 19; // HACK!! find_unit(HUMAN, "BOUDICEAN");

Incidentally...

good thing: units are integers
bad thing: no sign of direct DB access to them

good thing: units are also strings
bad thing: find_unit(player, unit) only works on strings??

 
Pages (2): [ 1   2   ]
< Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:23.
Apolyton Time is 00:23.
    top of page
Rate This Thread:
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0674 seconds (92.12% PHP - 7.88% MySQL) with 49 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net