Forums
Settlers Maps :: Forums :: Editor Help :: Rise of an Empire Editor
 
<< Previous thread | Next thread >>
Vikings
Moderators: Cyberken, BTOG46
Author Post
aslindy
Fri Jul 16 2010, 08:57PM

Registered Member #1470
Joined: Tue Jun 03 2008, 01:18PM
Posts: 98
I have read, and searched, and read, and searched... here and all the ROAE forums I can find, and looked at every map I can open, but cannot figure out how to work the Viking attack using quests. I did find some scripting information.

I have the newest lua I can find - 3.9. There is a Reward Trigger and Init Viking attack (don't remember exact name). I understand how to make the Vikings attack one time, but I cannot for the life of me make them attack again. I see the Reward says the second time Player ID is ignored - but I don't really understand why that is so?

If I restart the quest, or if I set up a second quest to make the Vikings attack, either way that second time all they do is stand there on the shore. I can attack THEM, but they won't come after my buildings. AND, once I kill off that second bunch, the ship never leaves, it stays on the shore forever, and I can't trigger any more Viking attacks after that.

Has anyone used that new lua to set up viking attacks using quests?

Though you cannot go back and make a brand new start,
you can start from now and make a brand new end.
Back to top
Lord_Oden1234
Sun Jul 18 2010, 03:09AM
Registered Member #9062
Joined: Thu Jun 24 2010, 07:03AM
Posts: 8
have you assigned the vikings an ID of their own, say player 8? Actually let me go try what you're doing and see if i can get the script and stuff figured out, i'll post my, er, experiment, later.

[ Edited Sun Jul 18 2010, 03:10AM ]
Back to top
Lord_Oden1234
Sun Jul 18 2010, 03:16AM
Registered Member #9062
Joined: Thu Jun 24 2010, 07:03AM
Posts: 8
Alright, did you do all of this:

Vikings will not attack the player’s special buildings (castle, storehouse, cathedral, and
marketplace). Resource gatherers or town buildings may be set on fire though.
To make sure that everything works, you need to place a few script entities in the map editor for the
Player ID of the Viking AI player (via Place Entities > Script):
· XD_ScriptEntity with the script name “VikingsShipStart”. This is where the Viking ship will
appear.
· XD_ScriptEntity with the script name “VikingsShipEnd” in vicinity of beach. The Viking
ship will sail to this point before the attack.
· S_AIHomePosition close to the beach where the Vikings are supposed to land.
· XD_ScriptEntity with the script name “VikingsSpawnPoint” in a walkable beach area. This
is where the Vikings will leave their boat.
· Optionally a XD_ScriptEntity with the script name “VikingsTarget”. If no such target is set,
the Vikings will pick it for themselves.
Look for the function Mission_InitPlayers() in your map script. Add the following script block to
the function:
Viking = AIPlayer:new( AIPlayerID, AIPlayerProfile_Viking )
Viking.m_ShipSpawnID = Logic.GetEntityIDByName("VikingsShipStart")
Viking.m_ShipEndID = Logic.GetEntityIDByName("VikingsShipEnd")
Viking.m_VikingSpawnID = Logic.GetEntityIDByName("VikingsSpawnPoint")
Viking.m_NumberOfVikings = NumberOfAttackers
Viking.m_StartAttackMonth = Month
-- The following line is only necessary if a target was set
Viking.m_TargetID = Logic.GetEntityIDByName("VikingsTarget")
· AIPlayerID: A free Player ID. There should not be any buildings or units with this
Player ID.
· NumberOfAttackers: Number of Viking units created after the ship has landed. 8 units
are usually sufficient to destroy a woodcutter’s hut.
· Month: corresponds to the month the Viking attack is triggered.

If so, i'll post again soon to see what the problem might be. Also, i'd like a few things cleared up for me: Are you trying to get the vikings to attack on their own or is the invastion triggered by a quest completion? Have you assigned to player ID to all script entities, and is it the same for all?
Back to top
aslindy
Sun Jul 18 2010, 07:42PM

Registered Member #1470
Joined: Tue Jun 03 2008, 01:18PM
Posts: 98
Thank you for trying to help! I appreciate it!

OK, that's exactly what I've read elsewhere, and yes, I did put the ScriptEntities on the map, I gave the vikings their own id and all the entities have that ID - I also tried it with the vikings having the same id as some bandits, and either way they acted the same. The first time they DID attack my resource buildings but the second time just stood on the beach until my knight or units got close, then they fought.
I did not add the stuff to the map script, since I am calling the vikings using the Quests - all that info is in the Quest (AIPlayerID, Ship Spawn location, Ship end location, etc).
I have been trying this on a quest testing map I use, and I set it up using TriggerOnMonth. Since the game default is to start in the 3rd month, I triggered it in the 4th month, and had them attack in the 5th month - and all that worked ok. Then in the 7th month I said to restart the quest... the vikings come but do not attack, and the ship then stays on the beach even if I kill all the Vikings, and they never return again.

[ Edited Sun Jul 18 2010, 07:43PM ]

Though you cannot go back and make a brand new start,
you can start from now and make a brand new end.
Back to top
Lord_Oden1234
Sun Jul 18 2010, 10:07PM
Registered Member #9062
Joined: Thu Jun 24 2010, 07:03AM
Posts: 8
alright, well first, a question: You do know about using expert mode and exporting, changing, and importing map scripts correct? If you do, great, if not, i'll run you through it to see if that might be the problem. After that, i'll set up my own with your setup and see if i can get it to work.
Back to top
aslindy
Sun Jul 18 2010, 10:22PM

Registered Member #1470
Joined: Tue Jun 03 2008, 01:18PM
Posts: 98
Yes, indeed, I do know about those things. =)
Let me know what you find out, and I thank you for the help.

Though you cannot go back and make a brand new start,
you can start from now and make a brand new end.
Back to top
 

Jump:     Back to top

Syndicate this thread: rss 0.92 Syndicate this thread: rss 2.0 Syndicate this thread: RDF
Powered by e107 Forum System
Copyright © 2010 Settlers Maps


The Settlers © 2010 Ubisoft Entertainment. All Rights Reserved. The Settlers, The Settlers 7 Paths to a Kingdom, Blue Byte and the Blue Byte logo are trademarks of Red Storm Entertainment in the US and/or other countries. Ubisoft and the Ubisoft logo are trademarks of Ubisoft Entertainment in the US and/or other countries. Red Storm Entertainment Inc is a Ubisoft Entertainment company.