[Mission] Teamwork 2

14 replies [Last post]
Arkhnen
User offline. Last seen 6 years 12 weeks ago. Offline
Joined: 2012-10-30
Posts: 9

It's my first mission Big Grin Sorry for mistakes, I'm polish and I can't speak english very well.

http://www.mediafire.com/?qd237n3kdc9etpt

Vatten
Vatten's picture
User offline. Last seen 1 year 34 weeks ago. Offline
Joined: 2009-09-02
Posts: 48

nice mission!

Vattenania, my beloved motherland, my beloved homeland! You are always with me in my thoughts and in my heart!

Arkhnen
User offline. Last seen 6 years 12 weeks ago. Offline
Joined: 2012-10-30
Posts: 9

Thanks, it isn't too hard? Wink Smiley

mikade
mikade's picture
User offline. Last seen 49 weeks 3 days ago. Offline
Joined: 2010-10-22
Posts: 355

Nice mission. A bit too easy, though. You don't need a second parachute and Greg should only have 1 health. That said, I'm not sure I did it the 'right' way. Did you intend for the user to use the Flying Saucer in the solution, or was that you just trolling people?
https://dl.dropbox.com/u/15139166/nextplease.41.hwd

Please make more missions. Smile

mikade
Hedgewars Developer

Arkhnen
User offline. Last seen 6 years 12 weeks ago. Offline
Joined: 2012-10-30
Posts: 9

I intended Flying Soucer becouse I saw only one way to complete this mission: Aghh

http://www.mediafire.com/?x45bw6d0fbrn7s7

I will try make this mission more difficult in the weekend.

EDIT: Why it doesn't work on new wersion? Annoyed

nemo
nemo's picture
User offline. Last seen 23 weeks 4 days ago. Offline
Joined: 2009-01-28
Posts: 1861

Arkhnen allegedly wrote:

EDIT: Why it doesn't work on new wersion? Annoyed

Positions are relative to map size now, by power of two.
For supporting variable size maps.
Basically, using LAND_WIDTH/LAND_HEIGHT variables.

You can recode to position relative to LAND_WIDTH/LAND_HEIGHT, or you can just hardcode based on that.
$ identify CrazyMission/map.png
CrazyMission/map.png PNG 2048x1024 2048x1024+0+0 8-bit DirectClass 234KB 0.000u 0:00.000

so. 2048x1024 LAND_WIDTHxLAND_HEIGHT

Just subtract 1024 from X positions, and 1024 from Y positions (only 1024 from X because map is centred, and used to be 4096. (4096-2048)/2 = 1024)

Pretty easy to do programmatically w/ a vim regex which can do math Smile

For example

AddGear(1379, 1846, gtSMine, 0, 0, 0, 0)
AddGear(1539, 1549, gtSMine, 0, 0, 0, 0)
AddGear(2104, 1845, gtMine, 0, 0, 0, 0)
AddGear(2079, 1845, gtMine, 0, 0, 0, 0)
AddGear(1954, 1611, gtMine, 0, 0, 0, 0)
AddGear(1979, 1580, gtMine, 0, 0, 0, 0)
AddGear(2004, 1580, gtMine, 0, 0, 0, 0)
================
running...
%s/AddGear(\(\d\+\),\s*\(\d\+\)\(.*\))/\='AddGear('.(submatch(1)-1024).', '.(submatch(2)-1024).submatch(3).')'/
yields...
================
AddGear(355, 822, gtSMine, 0, 0, 0, 0)
AddGear(515, 525, gtSMine, 0, 0, 0, 0)
AddGear(1080, 821, gtMine, 0, 0, 0, 0)
AddGear(1055, 821, gtMine, 0, 0, 0, 0)
AddGear(930, 587, gtMine, 0, 0, 0, 0)
AddGear(955, 556, gtMine, 0, 0, 0, 0)
AddGear(980, 556, gtMine, 0, 0, 0, 0)

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

mikade
mikade's picture
User offline. Last seen 49 weeks 3 days ago. Offline
Joined: 2010-10-22
Posts: 355

Arkhnen allegedly wrote:

I intended Flying Soucer becouse I saw only one way to complete this mission: Aghh

http://www.mediafire.com/?x45bw6d0fbrn7s7

I will try make this mission more difficult in the weekend.

EDIT: Why it doesn't work on new wersion? Annoyed


Well, having multiple solutions to your mission isn't always a bad thing. Having easy missions isn't bad either. Many users complain that the current set of levels are too difficult.

If you did intend for saucer to be used I think you should state "Fuel for the Flying Saucer is extremely limited" in the mission info. You have already provided the mine time so you should provide other pertinent info, too, especially given the difficulty people might have in just getting to the saucer in the first place.

Other than that, make soms pngs to represent your mission and then we can bundle it in the next downloadable content pack.

mikade
Hedgewars Developer

Arkhnen
User offline. Last seen 6 years 12 weeks ago. Offline
Joined: 2012-10-30
Posts: 9

Smile Thanks for informations

Wuzzy
Wuzzy's picture
User offline. Last seen 29 weeks 2 days ago. Offline
Joined: 2012-06-20
Posts: 1304

This mission doesn't work with the most recent version 0.9.18. I "win" immediately the mission without doing anything.
Annoyed

I am totally unexperienced with creating missions; so I can't fix this myself. Does anyone have an idea how to fix this?

Hi, I am a Hedgewars developer. Smile

sphrix
sphrix's picture
User offline. Last seen 19 hours 28 min ago. Offline
Joined: 2011-04-07
Posts: 207

its because you have to change the XandY coord

i suggest you to open the file, and replace by this :

its the same but with updated position XY Wink Smiley

loadfile(GetDataPath() .. "Scripts/Locale.lua")()

local player = nil
local hlayer = nil
local enemy = nil
local Pack = nil
local help = false
local GameOver = false

function onGameInit()

Seed = 0
GameFlags = gfDisableWind
SuddenDeathTurns = 9999
TurnTime = 600000000
CaseFreq = 0
MinesNum = 0
MinesTime = 1
Explosives = 0
Delay = 10
Map = "CrazyMission"
Theme = "CrazyMission"

AddTeam(loc("Feeble Resistance"), 14483456, "Simple", "Island", "Default")
player = AddHog(string.format(loc("Greg"), 1), 0, 30, "NoHat")
hlayer = AddHog(string.format(loc("Mark"), 2), 0, 40, "NoHat")

AddTeam(loc("Cybernetic Empire"), 1175851, "Simple", "Island", "Robot", "cm_binary")
enemy = AddHog(loc("Diego"), 5, 50, "cyborg1")

SetGearPosition(player, 180, 555)
SetGearPosition(enemy, 1500, 914)
SetGearPosition(hlayer, 333, 555)

end

function onGameStart()

Pack = SpawnAmmoCrate(40,888,amPickHammer)
SpawnAmmoCrate(90,888,amBaseballBat)
SpawnAmmoCrate(822,750,amBlowTorch)
SpawnAmmoCrate(700,580,amJetpack)
SpawnAmmoCrate(1400,425,amParachute)
SpawnAmmoCrate(1900,770,amDynamite)
SpawnAmmoCrate(1794,970,amDynamite)

ShowMission(loc("Codename: Teamwork 2"), loc(""), loc("- Eliminate Diego |- Feeble Resistance must survive") .. loc("|- Mines Time:") .. " " .. 0 .. " " .. loc("sec"), 0, 0)
--miny
AddGear(355, 822, gtSMine, 0, 0, 0, 0)
AddGear(515, 525, gtSMine, 0, 0, 0, 0)
AddGear(1080, 821, gtMine, 0, 0, 0, 0)
AddGear(1055, 821, gtMine, 0, 0, 0, 0)
AddGear(930, 587, gtMine, 0, 0, 0, 0)
AddGear(955, 556, gtMine, 0, 0, 0, 0)
AddGear(980, 556, gtMine, 0, 0, 0, 0)
AddGear(1005, 556, gtMine, 0, 0, 0, 0)
AddGear(710, 790, gtMine, 0, 0, 0, 0)
AddGear(685, 790, gtMine, 0, 0, 0, 0)
AddGear(660, 790, gtMine, 0, 0, 0, 0)
AddGear(1560, 540, gtMine, 0, 0, 0, 0)
AddGear(1610, 600, gtMine, 0, 0, 0, 0)
AddGear(1660, 655, gtMine, 0, 0, 0, 0)
AddGear(713, 707, gtMine, 0, 0, 0, 0)
AddGear(1668, 969, gtExplosives, 0, 0, 0, 0)
AddGear(1668, 906, gtExplosives, 0, 0, 0, 0)
AddGear(1668, 842, gtExplosives, 0, 0, 0, 0)
AddGear(1713, 969, gtExplosives, 0, 0, 0, 0)
SetWind(90)

end

function onGearAdd(gear)

if GetGearType(gear) == gtJetpack then
SetHealth(gear,300)
end

end

function onAmmoStoreInit()

SetAmmo(amParachute, 1, 0, 0, 2)
SetAmmo(amSwitch, 9, 0, 0, 0)
SetAmmo(amSkip, 9, 0, 0, 0)
SetAmmo(amPickHammer, 0, 0, 0, 1)
SetAmmo(amBaseballBat, 0, 0, 0, 1)
SetAmmo(amBlowTorch, 0, 0, 0, 2)
SetAmmo(amJetpack, 0, 0, 0, 1)
SetAmmo(amDynamite, 0, 0, 0, 1)
end

function onGearDelete(gear)

if gear == Pack then
HogSay(CurrentHedgehog, loc("This will certianly come in handy"), SAY_THINK)
end

if (gear == enemy) and (GameOver == false) then
ShowMission(loc("Codename: Teamwork 2"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
GameOver = true
elseif ( ((gear == player) or (gear == hlayer)) and (GameOver == false)) then
ShowMission(loc("Codename: Teamwork 2"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
GameOver = true
SetHealth(hlayer,0)
SetHealth(player,0)
end
end

the beachs hogs surfin hedgewars

Wuzzy
Wuzzy's picture
User offline. Last seen 29 weeks 2 days ago. Offline
Joined: 2012-06-20
Posts: 1304

Thanks. It worked for me and I have finished the mission. Nothing too hard, but I liked it. I think the mission can stay this way.

I have created a preview image for the mission:

Nothing too special, but it is better than the default image, right? Wink Smiley

Oh, and I have packaged the corrected mission (tested for 0.9.18) with the new image. The code is the same than that one posted by my previous poster, except for indentation. You can download the package from one of these mirrors:

Better having one copy too much is my motto. Wink Smiley

If all these mirrors failed, please contact me immediately.

Hi, I am a Hedgewars developer. Smile

sphrix
sphrix's picture
User offline. Last seen 19 hours 28 min ago. Offline
Joined: 2011-04-07
Posts: 207

i finally did it :p
yeah i gave up lot of time cause i was bad at baseball bat aha :lol:

but i finally did it, and, without flying saucer, don't know why it should have been used o0
bah as mikade said, having multiple solution is good

here is my demo of the mission : https://dl.dropbox.com/u/82215817/teamwork2%20mission%20sucess.43.hwd

and if you wanna do other mission, well you have all my encouragment :p

the beachs hogs surfin hedgewars

Wuzzy
Wuzzy's picture
User offline. Last seen 29 weeks 2 days ago. Offline
Joined: 2012-06-20
Posts: 1304

This script broke again in 0.9.20, lol.

I have made another update to this script, and it should work in 0.9.20 and in 0.9.21:

Teamwork_2_v2.hwp

Above HWP file contains versioned (v2) mission and preview image. It does NOT contain description strings, you have to add them manually (if you want).

Here are the description strings:
For missions_en.txt:

User_Mission_-_Teamwork_2_v2.name=Mission: Teamwork 2
User_Mission_-_Teamwork_2_v2.desc="Use your teamwork skills to defeat the cybernetic enemy!"

For missions_de.txt:

User_Mission_-_Teamwork_2_v2.name=Mission: Teamwork 2
User_Mission_-_Teamwork_2_v2.desc="Benutze deine Teamfähigkeiten, um den kybernetischen Feind zu besiegen!"

In my opinion this mission is now good enough to be included into Hedgewars, I tested it under 0.9.21.

Edit: Version 2 uploaded. This is just some code cleanup.

Hi, I am a Hedgewars developer. Smile

Wuzzy
Wuzzy's picture
User offline. Last seen 29 weeks 2 days ago. Offline
Joined: 2012-06-20
Posts: 1304

I just included this mission into the developer version of Hedgewars, with some minor changes. Teamwork 2 will be part of Hedgewars 0.9.23.

I think this step was LONG overdue. Big Grin
Again, thanks for this nice mission.

Credit is given in the CREDITS file.

Hi, I am a Hedgewars developer. Smile

Arkhnen
User offline. Last seen 6 years 12 weeks ago. Offline
Joined: 2012-10-30
Posts: 9

I've been waiting for this moment for years, haha. Thx Wuzzy! Smile

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]