How Do Code?
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.
How Do Code?
Where do you access the interface to add event triggers and such? I dont know how to do that, but I'm trying to help set up a scenario and I dont know where to start.
Re: How Do Code?
There is no interface for adding events, you do all of that with a normal text editor by editing the .cfg files of your scenario. The wiki should contain information about that https://wiki.wesnoth.org/BuildingScenarios is the colses i coudl find with a quick look in the wiki for a writing scenarios intro. Its probalby a little outdated though.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- Pentarctagon
- Project Manager
- Posts: 5531
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: How Do Code?
To add to that, you should probably use one of these editors. You can also check out this page on the wiki.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: How Do Code?
The wiki uses a lot of terminology that I'm unfamiliar with. It seems to assume I know anything at all about coding, which I dont. How do I read the file? I can view it but it is arcane to me. And what are tags, and how are they applied?
Re: How Do Code?
This is a tag:
https://github.com/wesnoth/wesnoth/blob ... fg#L31-L34
I suggest that you start by adding a "hello world" message to the campaign An Orcish Incursion. Try and get the orc leader to say "Hello world" at the start of blue's third turn, for example.
edit: You'd do that by adding [event] and [message] tags later in the scenario file. Thanks Pentarctagon for pointing out that I should have clarified this.
https://github.com/wesnoth/wesnoth/blob ... fg#L31-L34
I suggest that you start by adding a "hello world" message to the campaign An Orcish Incursion. Try and get the orc leader to say "Hello world" at the start of blue's third turn, for example.
edit: You'd do that by adding [event] and [message] tags later in the scenario file. Thanks Pentarctagon for pointing out that I should have clarified this.
- Pentarctagon
- Project Manager
- Posts: 5531
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: How Do Code?
"view" and "read" are the same thing - you open the file in the text editor, which allows you to make changes to it. Tags are, for the sake of simplicity, how you tell Wesnoth to do something(there is also lua, but that's something to tackle later).
As a more specific example of what josteph mentioned, if you place this code inside the file he linked:
Code: Select all
[event]
name=start
[message]
message="testing123"
[/message]
[/event]
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: How Do Code?
I don't know if you've seen it or not, but there is a tutorial designed for beginners:
https://wiki.wesnoth.org/WML_for_Complete_Beginners
This will explain things like what a "tag" is, etc.
https://wiki.wesnoth.org/WML_for_Complete_Beginners
This will explain things like what a "tag" is, etc.