Newbie aspiring to code for Wesnoth

Discussion of all aspects of the game engine, including development of new and existing features.

Moderator: Forum Moderators

Post Reply
User avatar
JW
Posts: 5046
Joined: November 10th, 2005, 7:06 am
Location: Chicago-ish, Illinois

Newbie aspiring to code for Wesnoth

Post by JW »

Hi everyone. I recently found this game and have become quite addicted to it. The strategy involved is astouding and the game is incredibly well balanced. Thanks to the coders and testers for creating such a great game!

Having said this, I think there's a lot of room for the game of Wesnoth to expand. I would like to help in this effort. A simple problem arises when I tell you that I have no relevant coding experience in which to begin my own efforts.

I am hoping someone could take me under their wing and teach me some basics. I learn new concepts quickly and have quite a head for logic and math, so I wager I could make great leaps with minimal guidance.

Things I would like to accomplish would be creating a new, balanced race that has a unique trait (similar to how elves have Dextrous) and a unique ability. I am also considering the possibility of a different type of attack, but I doubt this is possible as I assume that each unit would then have to be recoded to include resistancies to this new attack type.

I am also considering, once all of this is accomplished, creating a custom campaign featuring the new race and showing off its style.



As you can see, I am aiming quite high for starting off so low. I don't even know where to begin in terms of where to access codes, the programs to use, the commands, etc. I am, however, quite focused on learning all of these things in one way or another. I was hoping that with your help and guidance it would be a lot easier to achieve all of these goals in a relitively short period of time.

Any assistance would be greatly appreciated and I thank you all in advance. Until then I will remain an avid player. =)

-JW
Jose Luis
Posts: 36
Joined: October 31st, 2005, 12:19 pm

Post by Jose Luis »

Hi! Welcome!

To create a new race you don't need to know much programming. There is a markup language for Wesnoth, (WML), you can check its sintaxis in

http://www.wesnoth.org/wiki/ReferenceWML

Anyway, I recomend you to take an existing race as a base, you can copy it from the data directory of wesnoth. Then you can modify it to create the new race. I think you can also create traits or habilities using WML, if they are not mayor changes in the game.

Also campaigns are created in WML. Again, you can start with a campaign you like or similar to yours and then you can modify. But for testing a new race, I recomend you to define an era to play in multiplayer games.

Good luck!
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

If you want to write an expansion to the game, you don't need to know any code. The "create" tab at the top is just for you. If you're looking to actually write some game code, I can think of some projects you can work on (but I can't teach you anything about it).
Hope springs eternal.
Wesnoth acronym guide.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Folks around here usually associate "coding" (and thus, this forum) as meaning coding the game engine itself, which is written in C++. Campaigns, scenarios, units, etc. are on the other hand written in WML, which isn't considered as being "code". This was just to avoid misunderstandings, the others actually already pointed you in the right direction in learning WML.
User avatar
JW
Posts: 5046
Joined: November 10th, 2005, 7:06 am
Location: Chicago-ish, Illinois

Post by JW »

Thanks a lot guys. I've found some info from the link that can get me started. It appears to be a lot easier then I previously expected. I'm liking that. =)

If I run into any problems I'll be sure to ask for help along the way.

One thing I'd like to know, before I get too much further, is what file type do I save the the editted files as? I'm using winword to edit the text and am not sure what type to save the editted file as. Will saving it as a word document be sufficient? Or will I need to do something else in order for it to be recognized?
scott
Posts: 5243
Joined: May 12th, 2004, 12:35 am
Location: San Pedro, CA

Post by scott »

JW wrote: One thing I'd like to know, before I get too much further, is what file type do I save the the editted files as? I'm using winword to edit the text and am not sure what type to save the editted file as. Will saving it as a word document be sufficient? Or will I need to do something else in order for it to be recognized?
Save them as plain text with no formatting. A file extension is optional (.cfg is the custom, but the game doesn't care).
Hope springs eternal.
Wesnoth acronym guide.
Jose Luis
Posts: 36
Joined: October 31st, 2005, 12:19 pm

Post by Jose Luis »

JW wrote:Thanks a lot guys. I've found some info from the link that can get me started. It appears to be a lot easier then I previously expected. I'm liking that. =)

If I run into any problems I'll be sure to ask for help along the way.

One thing I'd like to know, before I get too much further, is what file type do I save the the editted files as? I'm using winword to edit the text and am not sure what type to save the editted file as. Will saving it as a word document be sufficient? Or will I need to do something else in order for it to be recognized?
I recomend you to use a plain text editor, because word add it's own code in the text. The notepad would be much better. If you work on linux, then there are many editors. I use kate or kedit, but any other is ok.
ILikeProgramming
Posts: 837
Joined: April 14th, 2005, 4:17 am

Post by ILikeProgramming »

I use emacs.
yakip
Posts: 7
Joined: November 4th, 2005, 9:30 am
Location: Calgary

Post by yakip »

I use x-emacs with cygwin on windows.(X-emacs = dream for C)
User avatar
JW
Posts: 5046
Joined: November 10th, 2005, 7:06 am
Location: Chicago-ish, Illinois

Post by JW »

Update:

I currently have a strong conceptual basis for a new, self-contained faction. I've splashed some numbers around and appear to have a good balance - on paper. I have yet to code these units and find / create some art for them. At the point that I do I will playtest them some myself before I reveal the faction here.

The reason I'm going about it this way is to maintain artistic purity until the faction is relatively cemented. At that point I'll let people argue all day as to the balance and usefulness of the faction.

Hopefully I'll have some art before Thanksgiving as well as some coding.

I'll keep you guys updated.
Minor_Joey
Posts: 20
Joined: January 2nd, 2006, 1:59 am
Location: Pennsylvania, United States

Post by Minor_Joey »

I don't know how you guys do this, but i can tell you one thing, it doesn't look simple :P
eradicus
Posts: 2
Joined: January 19th, 2006, 2:32 pm
Location: /dev/null
Contact:

aspiring for a wesnoth devel

Post by eradicus »

I am hoping to contribute something in this cool project. Anyone can teach me where to start aside from diving in to the code straight?
Post Reply