Well a couple problems...

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Sandman420
Posts: 24
Joined: March 24th, 2006, 11:37 am

Well a couple problems...

Post by Sandman420 »

Well my codes are attached...

The problem is when I try and start up the actual campaign, I get an error that says something like "Map not found"....


I don't know what I'm doing wrong, they are in .cfg file... Any help would be appreciated. Thanks.
Edit- Guess I can't put in map files, so if you need the maps to help me just msg me on msn or aim
Attachments
ALiB1.cfg
(3.91 KiB) Downloaded 357 times
ALiB2_1.cfg
(3.43 KiB) Downloaded 340 times
ALiB2_2.cfg
(1.19 KiB) Downloaded 352 times
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

A few errors I picked up by skimming through the ALiB1.cfg:
  • The [story] is not closed.
  • map_data="{maps/A_Legend_is_Born/ALiB1}" might be wrong from the looks of it. Can't know for sure though.
  • [ai] parameters such as aggression=4.0 directly in a [side].
  • [colour_adjust]s and [message]s written outside of an [event].
  • type=Elven Fighter is wrong, unless you've created such a unit yourself.
  • Slashes in scenario id's. Obviously you better make sure id's with slashes work before using them.
In the other two you:
  • Give empty x= and y= keys, which makes absolutely no sense and might cause errors.
  • Use the key generate_name=yes, which doesn't exist.
  • Have an empty map_data= key.
toms
Posts: 1717
Joined: November 6th, 2005, 2:15 pm

Post by toms »

zookeeper wrote:Use the key generate_name=yes, which doesn't exist.
Yes, but generate_description=yes exist, and that is probably what you want to have. :)
First read, then think. Read again, think again. And then post!
Sandman420
Posts: 24
Joined: March 24th, 2006, 11:37 am

Post by Sandman420 »

Ahh thanks, the empty x,y, and map data are there cause I can't figure it out yet lol

Generate_name I found somewhere in someones code so I thought I'd use it lol. Thanks for the help
Edit- Ok welll... I took HttT campaign, copied it, and edited it so it would be my campaign... yet it still doesn't play. Any help?
toms
Posts: 1717
Joined: November 6th, 2005, 2:15 pm

Post by toms »

At the map data problem, there is another way, but some people don´t like it.

Code: Select all

map_data=_"(copy and paste the map in here)"
First read, then think. Read again, think again. And then post!
Sandman420
Posts: 24
Joined: March 24th, 2006, 11:37 am

Post by Sandman420 »

Well I fixed it all... now it just doesnt work right. Like the scenario and map load, and the dialouge pops up... but thats all, the shrouding doesnt work (although thats not in my codes I dunno how to put it there if someone would tell me that'd be cool). I tried to make it so a unit (elvish fighter) would appear after turn 5, but I dunno how to do that (again help would be cool). Also I tried the color adjust with a message after that and then the elvish fighter would appear... didnt work only the message worked... but the message would work the first time I moved my character and thats all... which doesnt add to the storyline... any help would be appreceated.

Oh and the way I got it to work was in the campaign folder I needed to add scenario folder, unit folder, etc. and then map data= to the right spot.
toms
Posts: 1717
Joined: November 6th, 2005, 2:15 pm

Post by toms »

Please read the WML wiki.

Shroud=yes is put into the human side.

To create a unit on the end of turn 5, use this:

Code: Select all

[event]
name=new turn
first_time_only=no
 {VARIABLE_OP turn add 1}
[/event]
[event]
name=end turn
first_time_only=no
 [if]
 [variable]
 name=turn
 numerical_equals=5
 [/variable]
  [then]
   [unit]
   type=Elvish Fighter
   description=(his name)
   x,y=(his position)
    [modifiactions]
     {TRAIT_STRONG}
     #this is just an example
    [/modifications]
   #if he must not die,
   overlay=hero-icon.png #you'd have to copy it into your campaign folder
   [/unit]
  [/then]
 [/if]
[/event]
First read, then think. Read again, think again. And then post!
Sandman420
Posts: 24
Joined: March 24th, 2006, 11:37 am

Post by Sandman420 »

Thanks I was using shroud=1 lol

one questions whats this

[modifiactions]
{TRAIT_STRONG}
#this is just an example
[/modifications]
#if he must not die,
overlay=hero-icon.png #you'd have to copy it into your campaign folder

What do I need to edit?
toms
Posts: 1717
Joined: November 6th, 2005, 2:15 pm

Post by toms »

First, in the tag close there ia a mistype. :wink:
(it should be [/modifications] )

And if you want the unit to have this little shield in the right top corner, save the attached file in your campaign folder. (in "images")
First read, then think. Read again, think again. And then post!
Sandman420
Posts: 24
Joined: March 24th, 2006, 11:37 am

Post by Sandman420 »

Hehe I figured the mistype ^_^

but what about the stuff after the pound signs? can I just delete them or?

Also whats up with the hero-icon, does that mean like if he dies you lose?
well the command didnt work, its turn 7 and I still got no elvish fighter :cry:
User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Post by Ranger M »

toms wrote:Please read the WML wiki.

Shroud=yes is put into the human side.

To create a unit on the end of turn 5, use this:

Code: Select all

[event]
name=new turn
first_time_only=no
 {VARIABLE_OP turn add 1}
[/event]
[event]
name=end turn
first_time_only=no
 [if]
 [variable]
 name=turn
 numerical_equals=5
 [/variable]
  [then]
   [unit]
   type=Elvish Fighter
   description=(his name)
   x,y=(his position)
    [modifiactions]
     {TRAIT_STRONG}
     #this is just an example
    [/modifications]
   #if he must not die,
   overlay=hero-icon.png #you'd have to copy it into your campaign folder
   [/unit]
  [/then]
 [/if]
[/event]

instead of using all of that, which could be causeing a bug (variables sometimes do that if done wrong, and they are a pain to de-bug) why not just:

Code: Select all

[event]
name=turn 6
   [unit]
   type=Elvish Fighter
   description=(his name)
   x,y=(his position)
    [modifiactions]
     {TRAIT_STRONG}
     #this is just an example
    [/modifications]
   #if he must not die,
   overlay=hero-icon.png #you'd have to copy it into your campaign folder
   [/unit]
[/event]
it's much simpler, and less likely to have a typo/bug :D (the only downside is that it appears at the begginning of turn 6, not the end of turn 5.
Sandman420
Posts: 24
Joined: March 24th, 2006, 11:37 am

Post by Sandman420 »

well the unit isnt appearing at all with toms code (not to sound mean or anything), I'll try yours out.
Edit- well that ones not workin either... heres my script if you could check it and make sure I didn't do anything wrong that'd be kickass
Attachments
The_first_scenario.cfg
(2.58 KiB) Downloaded 337 times
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Code: Select all

   description=(his name)
   x,y=(his position)
Well, duh.

And also:

Code: Select all

next_scenario="meeting_with_father.cfg"
Wrong. You can't put a filename there. Read the WML reference. Actually, you never put the filename of a .cfg anywhere in WML code.
Sandman420
Posts: 24
Joined: March 24th, 2006, 11:37 am

Post by Sandman420 »

hehe ya I noticed the first thing after I posted ^_^

Well I took off the .cfg, but do I need the ("") around it still?

and thanks for the help

gah well the appears thats all worked out.. but now it doesnt recognize the next scenario

Edit-
I think I figured out that I need to put the id and not the name of the scenario for the next_scenario... but now my first scenario isn't even loading... but the weird thing is I didn't change anything in it sept change the next scenario...
gah this is confusing
User avatar
Ranger M
Art Contributor
Posts: 1965
Joined: December 8th, 2005, 9:13 pm
Location: England

Post by Ranger M »

Sandman420 wrote:I think I figured out that I need to put the id and not the name of the scenario for the next_scenario... but now my first scenario isn't even loading... but the weird thing is I didn't change anything in it sept change the next scenario...
gah this is confusing
yeah, you are supposed to use the next scenario id, not the file name.

as for it not starting, are you sure that the only thing that you altered was the next scenario, and the next scenario id (in the first scenario). as you might have accidently broken the campaign.cfg file (where you should also have used the first scenario's id, not file name) through changes there.

you might also have accidently have caused an error (clicking in the wrong place while modifieing, and then pressing backspace, but not noticing) I would suggest going over your code near any areas which you recently changed the code, not only just the areas which you changed.
Post Reply