|
Post by Ψїş†ÆCROW100 on Apr 10, 2006 0:39:00 GMT
Can somebody help me get the script so that I: -Cannot get past epoch 4 (Is it:SetMaxEpochUI(1); -Normal Conquest Victory conditions (with added script) -Locked teams - Make my campaigns apear under the campaigns menu, not scenario menu;in the DB file campscen i made: text_camp_SDA_name,"""The Second Dark Age""" text_camp_SDA_desc,"""The Second Dark Age"" Description:\n\n Blah Blah Blah -changing unit names and territory names to custom territories. I made: // Custom Misc Unit names tx_unit_misc_1,"""Slave""" tx_unit_misc_2,"""Zeus Heavey HERC""" tx_unit_misc_3,"""Rioter""" tx_unit_misc_4,"""Police"""
Can somebody help me with my troubles? I am most concerened with getting a script which is just defult conquest but with epoch max at 4 and some history and objectives.
|
|
|
Post by Freedom-Fighter on Apr 11, 2006 0:11:32 GMT
Hi, I'm one of the few people who know how to write scripts, though I'm not an expert(I have only done 2 scripts so far). I do know how to do most of the things you asked for. Except for how to make the custom campaign(s) into the campaign menu(I don't think you write that in the script anyway). And also I can only change the unit names one by one, but not the whole type. For example, I can make one of your man at arm call "Warrior of Gonder", but not the whole type. If you have any help just ask me and I'm happy to help.
|
|
|
Post by Freedom-Fighter on Apr 11, 2006 12:34:22 GMT
P.S I've made a beginner scripting manual myself and you can download it in EEHeaven
|
|
|
Post by Ψїş†ÆCROW100 on Apr 11, 2006 17:19:15 GMT
Thanks alot!
|
|
|
Post by Ψїş†ÆCROW100 on Apr 11, 2006 18:25:03 GMT
So far my script is this:
//////////////////////////////////////////////////////////// // Rebuilding Haung Hai' // // Author: MistaCrow100 // Copyright what, when. ////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////// // All rules are for the WORLD entity. ////////////////////////////////////////////////////////////
//== GENERAL SCENARIO INFORMATION == name = "Rebuilding Haung Hai'" brief = "On a large island off the coast of China, 1 city and two towns prospered, untill an invasion by unknown forces. Rebuild the destroyed city" //victory = "You are victorious!" //loss = "You have lost." hints = "The Zha have two towns, and to get to them you must go through the large city occupied by the Sai'" historicalInfo = "The island of which this battle took place is now submerged, and all records of any struggle for power there have been washed away to the depths of the Pacific ocean. But nobody can deny the 20,000 souls that perished for an island, which is nothing more than shallow water now." //description = "You and your people are banished by the emperor, after one of your men assinated the ex-emperor, and you have stumbled upon an island, with smoke rising everywhere. A lookout on your boats saw 1 city with people rebuilding, and 2 towns of men rebuilding great docks, and one unoccupied town. Your people have just stepped foot into the city. Now you control there destiny." //date = "1000 B.C"
END_SCENARIO
//////////////////////////////////////////////////////////// // DEFINITIONS ////////////////////////////////////////////////////////////
//PLAYERS constant int CHANG DYNASTY_PLAYER constant int ZHA DYNASTY_PLAYER constant int SAI DYNASTY_PLAYER //////////////////////////////////////////////////////////// // INITIALIZATION //////////////////////////////////////////////////////////// //PLAYERS CHANG DYNASTY_PLAYER = 1; ZHA DYNASTY_PLAYER = 2; SAI DYNASTY_PLAYER = 3;
SetMaxEpochUI(4); //this is only for display SetTechEnabled(CHANG DYNASTY_PLAYER, "Main13", false); //NO GOING TO EPOCH 5 SetTechEnabled(ZHA DYNASTY_PLAYER, "Main5", false); //NO GOING TO EPOCH 5 SetTechEnabled(SAI DYNASTY_PLAYER, "Main5", false); //NO GOING TO EPOCH 5 END_INITIALIZATION
// //////////////////////////////////////////////////////////// // RUNS AFTER CINEMATIC, BEFORE OBJECTIVES OPEN // ////////////////////////////////////////////////////////////
ACTION PreScenInfoPanelHook SCRIPT WORLD //nothing here END_SCRIPT END_ACTION
END_SCRIPT END_ACTION //////////////////////////////////////////////////////////// // EOF ////////////////////////////////////////////////////////////
But I do not know how to make it so that you lose if all your citizens and city centers are dead or destroyed, for all of the players.
|
|
|
Post by PzK on Apr 11, 2006 19:12:04 GMT
good job, your scenario looks like its gonna be fun.
|
|
|
Post by Freedom-Fighter on Apr 11, 2006 19:26:36 GMT
1) You didn't write "RULES FOR WORLD" after the //////////////////////////////////////////////////////////// // All rules are for the WORLD entity. ////////////////////////////////////////////////////////////
You need to write DEFINITIONS after //////////////////////////////////////////////////////////// // DEFINITIONS ////////////////////////////////////////////////////////////
You need to write INITIALIZATION after //////////////////////////////////////////////////////////// // INITIALIZATION //////////////////////////////////////////////////////////// (Actually that is my fault because I forgot to tell you in the manual!)
2) Another mistake: you've forgotton to put END_DEFINITIONS in the end of the definitions section.
3) To make a custom objective, first you need to name it in the Rules section. Before making the objective(s), just write the heading "SCENARIO".
Now you can make your objective! Here is what you need to do:
//NAME(This is only to make it easier to identify which objective is which) OBJECTIVE (Objective Code Name. Just name it something like "Obj_CHINESE_1") name = "DISPLAY NAME FOR YOUR OBJECTIVE" desc = "DESCRIPTION." type = (OBJECTIVE TYPE: If it is a primary objective, write kScenarioObjectiveType_Primary) END_OBJECTIVE
Here is an example from Battle For Middle-Earth:
//Protect Your people OBJECTIVE Obj_BFME_2 name = "Protect Your People" desc = "You lose if all your units and buildings are lost." type = kScenarioObjectiveType_Lose starthidden = 0 END_OBJECTIVE After you have done that, you also need to write it in the definitions and intilizations sections. In the definitions section, write:
// OBJECTIVES constant string (Name of the objective: Just write a name that you can easily remember, like "OBJ_PROTECT_PEOPLE")
Here is an example:
constant string OBJ_DEFEAT_MORDOR
In the Intilizations section, write:
//Objectives (Scenario NAME IN DEFINITION SECTION ="SCENARIO CODE NAME IN RULES SECTION";
Example:
//Objectives OBJ_PROTECT_PEOPLE ="Obj_CHINESE_1";
4) How to make the objective(s) work: The things in point 3 that I mentioned were only for display. So to make the objective(s) work, you need to create another new section:
//////////////////////////////////////////////////////////// // Obj_CHINESE_1(Name) //////////////////////////////////////////////////////////// RULE ruleObj_CHINESE_1 ONESHOT if (The Condition: You can find the conditions list in the Scripting Bible) then actionObj_CHINESE_1 END_RULE
ACTION actionObj_CHINESE_1 SCRIPT WORLD
(You can do delay in here, which means the time in seconds the objective works after the condition(s) come true. Just write " DoDelay( THE NUMBER OF SECONDS );
STEP (EFFECTS)
END_SCRIPT END_ACTION
It look like it is very complicated, but it works just like the triggers system in EE1. Now let's say you want an objective which player 1 wins if player 2 has lost all their units and buildings. And we will make a delay of 2 seconds. Here is what you need to do:
//////////////////////////////////////////////////////////// // Obj_CHINESE_1 //////////////////////////////////////////////////////////// RULE ruleObj_CHINESE_1 ONESHOT if (!PlayerInGame(2)) then actionObj_CHINESE_1 END_RULE
ACTION actionObj_BFME_1 SCRIPT WORLD
DoDelay( 2 );
STEP WinScenario();
END_SCRIPT END_ACTION
I hope you understand what I say in here. Because it's very difficult to explain how it works!
|
|
|
Post by Ψїş†ÆCROW100 on Apr 11, 2006 19:38:05 GMT
I understand most of it, but I want to make Player 1 win if BOTH player 2 and 3 have all there city centers and citizens destroyed.
|
|
|
Post by Freedom-Fighter on Apr 11, 2006 19:44:26 GMT
Here is the corrected version of your script. I've also added 2 custom objective in the end, which say you lose if all your units and buildings are lost. And the other one say you win if both Zai and Sai Dynasty lost all their buildings and units. It should look something like this:
//////////////////////////////////////////////////////////// // Rebuilding Haung Hai' // // Author: MistaCrow100 // Copyright what, when. ////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////// // All rules are for the WORLD entity. //////////////////////////////////////////////////////////// RULES FOR WORLD
SCENARIO //Protect Your People OBJECTIVE Obj_CHINESE_1 name = "NAME" desc = "DESCRIPTION" type = kScenarioObjectiveType_Primary(Or Secondary/Lose) starthidden = 0 END_OBJECTIVE
//Defeat Zha and Sai OBJECTIVE Obj_CHINESE_2 name = "NAME desc = "DESCRIPTION" type = kScenarioObjectiveType_Primary(Or Secondary/Lose) starthidden = 0 END_OBJECTIVE
//== GENERAL SCENARIO INFORMATION == name = "Rebuilding Haung Hai'" brief = "On a large island off the coast of China, 1 city and two towns prospered, untill an invasion by unknown forces. Rebuild the destroyed city" //victory = "You are victorious!" //loss = "You have lost." hints = "The Zha have two towns, and to get to them you must go through the large city occupied by the Sai'" historicalInfo = "The island of which this battle took place is now submerged, and all records of any struggle for power there have been washed away to the depths of the Pacific ocean. But nobody can deny the 20,000 souls that perished for an island, which is nothing more than shallow water now." //description = "You and your people are banished by the emperor, after one of your men assinated the ex-emperor, and you have stumbled upon an island, with smoke rising everywhere. A lookout on your boats saw 1 city with people rebuilding, and 2 towns of men rebuilding great docks, and one unoccupied town. Your people have just stepped foot into the city. Now you control there destiny." //date = "1000 B.C"
END_SCENARIO
//////////////////////////////////////////////////////////// // DEFINITIONS //////////////////////////////////////////////////////////// DEFINITIONS
//PLAYERS constant int CHANG DYNASTY_PLAYER constant int ZHA DYNASTY_PLAYER constant int SAI DYNASTY_PLAYER
//OBJECTIVES constant string OBJ_PROTECT_PEOPLE constant string OBJ_DEFEAT_ZHA_AND_SAI
END_DEFINITIONS
//////////////////////////////////////////////////////////// // INITIALIZATION //////////////////////////////////////////////////////////// INITIALIZATION
//OBJECTIVES OBJ_PROTECT_PEOPLE ="Obj_CHINESE_1"; OBJ_DEFEAT_ZHA_AND_SAI ="Obj_CHINESE_2";
//PLAYERS CHANG DYNASTY_PLAYER = 1; ZHA DYNASTY_PLAYER = 2; SAI DYNASTY_PLAYER = 3;
SetMaxEpochUI(4); //this is only for display SetTechEnabled(CHANG DYNASTY_PLAYER, "Main13", false); //NO GOING TO EPOCH 5 SetTechEnabled(ZHA DYNASTY_PLAYER, "Main5", false); //NO GOING TO EPOCH 5 SetTechEnabled(SAI DYNASTY_PLAYER, "Main5", false); //NO GOING TO EPOCH 5
END_INITIALIZATION
// //////////////////////////////////////////////////////////// // RUNS AFTER CINEMATIC, BEFORE OBJECTIVES OPEN // ////////////////////////////////////////////////////////////
ACTION PreScenInfoPanelHook SCRIPT WORLD //nothing here END_SCRIPT END_ACTION
//////////////////////////////////////////////////////////// // Obj_CHINESE_1 //////////////////////////////////////////////////////////// RULE ruleObj_CHINESE_1 ONESHOT if (!PlayerInGame(1)) then actionObj_CHINESE_1 END_RULE
ACTION actionObj_CHINESE_1 SCRIPT WORLD
DoDelay( 2 );
STEP LoseScenario();
//////////////////////////////////////////////////////////// // Obj_CHINESE_2 //////////////////////////////////////////////////////////// RULE ruleObj_CHINESE_2 ONESHOT if (!PlayerInGame(2)) && if (!PlayerInGame(2)) then actionObj_CHINESE_2 END_RULE
ACTION actionObj_CHINESE_2 SCRIPT WORLD
DoDelay( 2 );
STEP WinScenario();
END_SCRIPT END_ACTION //////////////////////////////////////////////////////////// // EOF ////////////////////////////////////////////////////////////
|
|
|
Post by Ψїş†ÆCROW100 on Apr 11, 2006 19:53:23 GMT
Thanks alot, someday I hope I can write scripts as good as you, and by the way, in your A conqueror is born scenario, the map is the same as the Unite the Greeks one somebody else made, but missing most of the other civilizations, did you ask the author for permission before doing that?
Bye the way, I am going to try to find a way to make end cinimatics, like the ones in the campaigns. My next scenario, Operation Swarmer (Ya, the one that recently happened in Iraq) should have specified battles like Helms Deep in BMFE.
|
|
|
Post by Freedom-Fighter on Apr 11, 2006 19:58:28 GMT
Actually, the scenarios Unite the Greeks and A Conquaror is born are both made by me. lol.
Good luck with your scripting, and the cinematics should be made with the cinematic spines. I am not sure how they work but I'm pretty sure someone is going to discover soon!
|
|
|
Post by Ψїş†ÆCROW100 on Apr 11, 2006 20:01:26 GMT
OH NOES I HAVE ANOTHER PROBLEM!!1! When I tried to load the script in the editor, a box popped up and it said Rebuilding Haung Hai'.IES could not be found, please specify another file, and I saved it under a different name and it still did not work.
|
|
|
Post by Freedom-Fighter on Apr 11, 2006 20:07:26 GMT
Hmmmm....That's strange. If you don't mind can you send me the script and I'll test it to see if anything wrong. My E-mail is kwcheung999@hotmail.com.
|
|
|
Post by Ψїş†ÆCROW100 on Apr 11, 2006 20:59:08 GMT
Ok, I emailed it to you.
|
|
|
Post by Freedom-Fighter on Apr 11, 2006 22:55:06 GMT
I don't know why it keeps saying "Rebuilding Haung Hai'.IES could not be found", but luckily I solved the problem by creating another ies. file and copy everything you have written in there. Anyway I've corrected the mistakes and made an objective which makes you win the scenario if you have completely eliminated player 2&3. I have emailed it back to you and hopefully it will work! Just tell me if it doesn't.
|
|