Coding/Scripting Problems

AppleApe

New member
Joined
Jun 5, 2010
Messages
327
Lately I have been doing some map scripting, and I have a frustrating problem.... 
I can't add miracles to the villages!  :angry
It's set to the right village, and if it wasn't spelled right the skirmish map would crash when I load it.
I am very mystified, this problem has not occurred to me before....
Here is the code that I am using:


Code:
CREATE_NEW_TOWN_SPELL (1,"FOOD")

CREATE_NEW_TOWN_SPELL (1,"WOOD")

CREATE_NEW_TOWN_SPELL (1,"WATER")

CREATE_NEW_TOWN_SPELL (1,"FLYING_FLOCK")

CREATE_NEW_TOWN_SPELL (1,"CREATURE_SPELL_INVISIBLE")

CREATE_NEW_TOWN_SPELL (1,"CREATURE_SPELL_FREEZE")


Help is very appreciated, if you have any ideas on how to make it work!  :help :) :help
 
I went over it.. I have no idea what went wrong with that part.

Could you attatch the entire txt file? Then I can look what went wrong.

Also.. lol - I have been away for so long.. and I necro a thread of two months ago.. xD
 
Forgot to do this.  :rolleyes
The code  :blues: :

Code:
VERSION(2.300000)
SET_LAND_NUMBER(0)
LOAD_LANDSCAPE(".\DATA\LANDSCAPE\Hill.lnd")
START_GAME_MESSAGE("AppleApe's: ~Poisoned~", 0)
ADD_GAME_MESSAGE_LINE("Welocome, Ha ha ha ha ha ahhhh……", 0)
START_CAMERA_POS("0.00,0.00")
SET_TOWN_INFLUENCE_MULTIPLIER(3.0000)
SET_PLAYER_INFLUENCE_MULTIPLIER(1.0000)
SET_NIGHTTIME(1700.000000, 01.00, 0.05000)


CREATE_CITADEL("403.02,300.80", 0, "PLAYER_ONE", 3000, 1000)

CREATE_SPELL_DISPENSER(0, "500.02,544.77", "TIBETAN_ABODE_SPELL_DISPENSER", "FOOD_PU1", 177, 1.0, 1)
CREATE_SPELL_DISPENSER(0, "200.02,474.77", "TIBETAN_ABODE_SPELL_DISPENSER", "WATER_PU1", 177, 1.0, 1)
CREATE_SPELL_DISPENSER(0, "518.02,574.77", "TIBETAN_ABODE_SPELL_DISPENSER", "HEAL_PU1", 177, 1.0, 1)
CREATE_SPELL_DISPENSER(0, "400.02,544.77", "TIBETAN_ABODE_SPELL_DISPENSER", "WOOD", 177, 1.0, 1)

CREATE_NEW_TOWN_SPELL (1, "FOOD")

CREATE_WORSHIP_SITE ("420.02,300.80",1, "PLAYER_ONE", "GREEK", 1, 1. 00)

CREATE_TOWN(1, "518.02,414.77", "PLAYER_ONE", 0, "GREEK")
SET_TOWN_BELIEF(1, "PLAYER_ONE", 0.750000)

CREATE_TOWN_CENTRE(1, "468.02,474.77", "GREEK_ABODE_TOWN_CENTRE", 2932, 1000, 0)

CREATE_NEW_TOWN_SPELL (1,"FOOD")


SET_TOWN_CONGREGATION_POS(1, "218.02,574.77")


SET_TOWN_BELIEF_CAP (1,"PLAYER_ONE", 9. 0000000)
SET_TOWN_BELIEF_CAP (1,"PLAYER_TWO", 1. 0000000)
SET_TOWN_BELIEF_CAP (1,"PLAYER_THREE", 1. 0000000)
SET_TOWN_BELIEF_CAP (1,"PLAYER_FOUR", 1. 0000000)
SET_TOWN_BELIEF_CAP (1,"PLAYER_FIVE", 1. 0000000)
SET_TOWN_BELIEF_CAP (1,"PLAYER_SIX", 1. 0000000)
SET_TOWN_BELIEF_CAP (1,"PLAYER_SEVEN", 1. 0000000)

CREATE_ABODE(1, "435.02,552.77", "GREEK_ABODE_STORAGE_PIT", -400, 1000, 200, 300)

CREATE_ABODE(1, "380.02,499.77", "GREEK_ABODE_WORKSHOP", -200, 1000, 0, 2700)

CREATE_TOWN_VILLAGER(1, "468.02,474.77", "GREEK_LEADER", 22)
CREATE_TOWN_VILLAGER(1, "468.02,474.77", "GREEK_LEADER", 22)CREATE_TOWN_VILLAGER(1, "468.02,474.77", "GREEK_LEADER", 22)CREATE_TOWN_VILLAGER(1, "468.02,474.77", "GREEK_LEADER", 22)CREATE_TOWN_VILLAGER(1, "468.02,474.77", "GREEK_LEADER", 22)CREATE_TOWN_VILLAGER(1, "468.02,474.77", "GREEK_LEADER", 22)CREATE_TOWN_VILLAGER(1, "468.02,474.77", "GREEK_LEADER", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)
CREATE_TOWN_VILLAGER(1, "418.02,474.77", "GREEK_HOUSEWIFE", 22)

CREATE_FOREST (34,"368.02, 544.77")

CREATE_NEW_TREE(34, "600.02,474.77", 13, 1, 0.285708, 1.562000, 1.562000)

REM Red Mushrooms 

CREATE_MOBILEOBJECT("315.02,300.80", 19, 0, 1000)
CREATE_MOBILEOBJECT("300.02,320.80", 19, 0, 2000)
CREATE_MOBILEOBJECT("285.02,285.80", 19, 0, 3000)
CREATE_MOBILEOBJECT("270.02,299.80", 19, 0, 5000)
CREATE_MOBILEOBJECT("270.02,255.80", 19, 0, 6000)
CREATE_MOBILEOBJECT("299.02,255.80", 19, 0, 4000)
CREATE_MOBILEOBJECT("300.02,340.80", 19, 0, 5000)
CREATE_MOBILEOBJECT("325.02,300.80", 19, 0, 2000)
CREATE_MOBILEOBJECT("336.02,300.80", 19, 0, 7000)

REM Blue Mushrooms

CREATE_MOBILEOBJECT("457.02,300.80", 18, 0, 3000)
CREATE_MOBILEOBJECT("440.02,325.80", 18, 0, 5000)
CREATE_MOBILEOBJECT("445.02,325.80", 18, 0, 7000)


REM Lavender Mushrooms


CREATE_MOBILEOBJECT("403.02,250.80", 17, 0, 7000)
CREATE_MOBILEOBJECT("410.02,255.80", 17, 0, 5000)
CREATE_MOBILEOBJECT("403.02,245.80", 17, 0, 3000)




CREATE_MIST("336.02,300.80", 0.000000, 11111111, 3.29, 1.0)

REM Weather

CREATE_WEATHER_CLIMATE(3, 3, "270.02,299.80", 330.294128, 388.529419)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)

CREATE_WEATHER_CLIMATE(3, 3, "218.02,574.77", 330.294128, 388.529419)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)

CREATE_WEATHER_CLIMATE(3, 3, "478.02,5000.77", 330.294128, 388.529419)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)



CREATE_WEATHER_CLIMATE(3, 3, "478.02,4270.77", 330.294128, 388.529419)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)
CREATE_WEATHER_CLIMATE_RAIN(3, 1.0, 0, 52, 1)



REM Enemy god

CREATE_CITADEL("499.02,5000.77", 0, "PLAYER_THREE", 6060, 1000)

CREATE_TOWN(2, "478.02,5000.77", "PLAYER_THREE", 0, "AZTEC")

SET_TOWN_BELIEF(2, "PLAYER_THREE", 0.750000)

CREATE_TOWN_CENTRE(2, "478.02,4270.77", "AZTEC_ABODE_TOWN_CENTRE", 2932, 1000, 0)



CREATE_ABODE(2, "512.02,4270.77", "AZTEC_ABODE_STORAGE_PIT", -400, 1000, 1000, 2000)


CREATE_ABODE(2, "481.02,4245.77", "AZTEC_ABODE_WORKSHOP", 3000, 1000, 0, 2700)

CREATE_ABODE(0, "481.02,4300.77", "AZTEC_ABODE_CRECHE", 4057, 1000, 0, 0)

CREATE_ABODE(0, "600.02,4290.77", "AZTEC_ABODE_GRAVEYARD", 4057, 1000, 0, 0)

CREATE_ABODE(0, "445.02,4270.77", "AZTEC_ABODE_E", 6282, 1000, 0, 0)
CREATE_ABODE(0, "435.02,4275.77", "AZTEC_ABODE_F", 6282, 1000, 0, 0)
CREATE_ABODE(0, "478.02,4360.77", "AZTEC_ABODE_A", 6282, 1000, 0, 0)
CREATE_ABODE(0, "467.02,4360.77", "AZTEC_ABODE_D", 6282, 1000, 0, 0)



CREATE_SPECIAL_TOWN_VILLAGER(2, "500.02,4270.77", 80, 19)
CREATE_SPECIAL_TOWN_VILLAGER(2, "500.02,4270.77", 80, 19)CREATE_SPECIAL_TOWN_VILLAGER(2, "500.02,4270.77", 80, 19)CREATE_SPECIAL_TOWN_VILLAGER(2, "500.02,4270.77", 80, 19)CREATE_SPECIAL_TOWN_VILLAGER(2, "500.02,4270.77", 80, 19)CREATE_SPECIAL_TOWN_VILLAGER(2, "500.02,4270.77", 80, 19)CREATE_SPECIAL_TOWN_VILLAGER(2, "500.02,4270.77", 80, 19)CREATE_SPECIAL_TOWN_VILLAGER(2, "500.02,4270.77", 80, 19)CREATE_SPECIAL_TOWN_VILLAGER(2, "500.02,4270.77", 80, 19)





CREATE_TOWN_VILLAGER(2, "473.02,4270.77", "AZTEC_HOUSEWIFE", 25)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_HOUSEWIFE", 25)CREATE_TOWN_VILLAGER(2, "476.02,4270.77", "AZTEC_HOUSEWIFE", 25)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_HOUSEWIFE", 25)CREATE_TOWN_VILLAGER(2, "472.02,4270.77", "AZTEC_HOUSEWIFE", 25)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_HOUSEWIFE", 25)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_HOUSEWIFE", 25)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_HOUSEWIFE", 25)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_HOUSEWIFE", 25)CREATE_TOWN_VILLAGER(2, "479.02,4270.77", "AZTEC_HOUSEWIFE", 25)



CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_HOUSEWIFE", 25)
CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_HOUSEWIFE", 25)
CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_HOUSEWIFE", 27)
CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_LEADER", 22)
CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_LEADER", 22)
CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FORESTER", 50)
CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FORESTER", 50)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FORESTER", 50)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FORESTER", 50)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FORESTER", 50)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FORESTER", 50)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FORESTER", 50)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FORESTER", 50)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FORESTER", 50)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FORESTER", 50)


CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 19)
CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 19)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 19)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 19)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 19)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 19)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 19)
CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 45)
CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 45)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 45)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 45)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 45)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 45)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 45)CREATE_TOWN_VILLAGER(2, "478.02,4270.77", "AZTEC_FARMER", 45)

CREATE_NEW_TOWN_SPELL (2,"FOOD")

SET_TOWN_BELIEF_CAP (2,"PLAYER_ONE", 9. 0000000)
SET_TOWN_BELIEF_CAP (2,"PLAYER_TWO", 1. 0000000)
SET_TOWN_BELIEF_CAP (2,"PLAYER_THREE", 9. 0000000)
SET_TOWN_BELIEF_CAP (2,"PLAYER_FOUR", 1. 0000000)
SET_TOWN_BELIEF_CAP (2,"PLAYER_FIVE", 1. 0000000)
SET_TOWN_BELIEF_CAP (2,"PLAYER_SIX", 1. 0000000)
SET_TOWN_BELIEF_CAP (2,"PLAYER_SEVEN", 1. 0000000)


 
you call the food spell twice, and you also call it once before the town is generated.

Fix that, and it should work.

Only call spells after you call the town, and don't call spells twice.
 
Back
Top