CampGen release

Discussion and development of scenarios and campaigns for the game.

Moderator: Forum Moderators

Post Reply
pyrael
Posts: 5
Joined: September 27th, 2007, 4:18 am

Post by pyrael »

That is wesnoth 1.3.8 and campgen 0.27

you're right though, I didn't make the map all grass. I had farms and villages , forests and a castle. I will try changing the map in campgen again. and re-running the game. perhaps that will fix the problems :P

EDIT:
ok, that did it :D

funny thing tho, when I first re-saved the map, it came up the way I origianlly wanted it (When I re-saved the map in the map editor, I changed to a keep for player 1) which is good I think :roll: :lol:

I also took a quick look at the scenarios for Under the Burning Suns and noticed that instead of having the map as part of the scenario file, it is used externally. Is there a way to do this via campgen? If not this might be a nice feature to add. here's the code In Under_the_Burning_Suns/scenarios/01_Morning_After.cfg that I am refering to:

Code: Select all

map_data="{campaigns/Under_the_Burning_Suns/maps/1MorningAfter5.map}"
also, another suggestion...

perhaps you could have campgen add a comment somewhere (beginning of the files?) that tells others who look at the code made by this program that it was made with campgen-x.xx? Not important to the workings, but credit for your program generating the code (IMHO) is only fair to you. Besides, it might have others who are interested in it use or help develop the code.:D
I am going to find myself. If I should return before we get back, tell us to wait!
User avatar
allefant
Units Database Administrator
Posts: 516
Joined: May 6th, 2005, 3:04 pm

Post by allefant »

About external maps, that should be doable. At the very least, a way to import and export them.

About the campgen notice, it already is in there, something like campgen="0.27" in the main campaign file - since that is used to decide whether to display a warning on loading or not. (There could be a comment in each other file as well.. but more important things to fix first.)
Grand Marshal Aditya
Posts: 134
Joined: August 1st, 2007, 1:37 am
Location: In the MOTHERLAND!

Post by Grand Marshal Aditya »

Sorry:

Despite playing Wesnoth for so long...I don't know how to use WML;

Well, I tried, the version 0.25 that is on the main wiki page. (See, I suck at programs and whatnot so I didn't try the whole python thing)

Well, a bunch of the things that were explained in the tutorials did not work.

So, is it possible for someone to dumb it down and explain it? I kept trying but it won't import properly and I can't find the "place items" button anywhere... :oops:

I would appreciate it very much...
Light travels faster than sound. This is why some people appear bright until you hear them speak.
Homer
Posts: 6
Joined: October 22nd, 2007, 4:18 pm

Post by Homer »

Very cool work you're doing.

But I am having one problem. When I try to make a campaign, the "side" formats aren't working. When I push the "done" button nothing happens, Campgen doesn't freeze and everything else seems to be working, but that just won't work.

I'm using Vista and Campgen 2.5 and Wesnoth 1.3.9. Any help would be greatly appreciated. :)

EDIT: So I reinstalled Wesnoth itself and it seems to work. Except now I can't get any units to come up to recruit/make leaders in the "side" menu at all...
Grand Marshal Aditya
Posts: 134
Joined: August 1st, 2007, 1:37 am
Location: In the MOTHERLAND!

Post by Grand Marshal Aditya »

SUGGESTION:

Might I suggest that we make the CampGen a mainline for developmental versions. Then, we can set it as default for the version of the game that it is with. That way it is far easier to use.

Also, can someone indicate a more comprehensive tutorial for the CampGen. I wasn't able to find a bunch of things and a bunch did not work the way the tutorial said.

I suggest that the tutorial be written in a way that even those who don't know WML can easily understand that stuff being discussed.
Light travels faster than sound. This is why some people appear bright until you hear them speak.
Tael_
Posts: 5
Joined: November 7th, 2007, 5:51 pm

Post by Tael_ »

Hello,
I tried to make a standalone mac package using py2app. It works almost fine, but I don't know how to include wxPython (I think I have to add a line in the setup.py).
Anybody knows how to do that ?

PS : is there any way to localize CampGen ?
User avatar
allefant
Units Database Administrator
Posts: 516
Joined: May 6th, 2005, 3:04 pm

Post by allefant »

With py2exe, it automatically pulls in wxpython - so no idea why py2app wouldn't do the same.

About localization - the generated campaigns should be localized (i.e. it defines textdomains and puts _ before strings when appropriate).

About using translated buttons and so on - it likely can be done by using Python's gettext module and wxPython's wxLocale. I won't do it since there are much more important things still missing currently - but if someone wants to work on it, I wouldn't mind.

About using translations from Wesnoth (unit names and so on), or switching the language of the campaign dialogs within Campgen, that likely is more complicated, but I don't know. It would mean somehow reading the gettext catalogs out of the main Wesnoth.
Tael_
Posts: 5
Joined: November 7th, 2007, 5:51 pm

Post by Tael_ »

The problem is that the provided setup.py is for py2exe and don't have the py2app options and commands.
If I create my own setup.py for py2app (with py2applet --make-setup), I don't know how to include wxPython.

Edit : I made a setup.py by "mixing" element of both my and your setup.py. I think wxPython is now included (no more missing library error) but I have the following error when lauching the application :

Code: Select all

PyAssertionError: C++ assertion "Ok()" failed at /BUILD/wxPython-src-2.8.6.1/src/mac/carbon/bitmap.cpp(1339) in ConvertToImage(): invalid bitmap
Here is my setup.py file :

Code: Select all

#!/usr/bin/env python

from setuptools import setup
import sys, glob, os
from distutils.core import setup
sys.path.append("scripts")
try: os.remove("MANIFEST")
except OSError: pass
import version



setup(name="campgen",
    app=["campgen.py"],
    setup_requires=["py2app"],
    version=version.version,
    description="Campaign Generator for Wesnoth",
    author="Allefant",
    author_email="allefant@gmail.com",
    url="http://wesnoth.org/wiki/CampGen",
    package_dir = {'campgen' : 'scripts', 'campgen/wesnoth' : 'scripts/wesnoth'},
    packages=["campgen", "campgen/wesnoth"],
    data_files=[
        ("share/campgen/data", glob.glob("data/*.*")),
        ("bin", ["campgen"])
        ],
    license=file("COPYING").read()
    )
User avatar
allefant
Units Database Administrator
Posts: 516
Joined: May 6th, 2005, 3:04 pm

Post by allefant »

Can you find out which actual line of code in python causes the problem? Likely I'm missing a check somewhere about a bitmap not being loaded - ideally if wx fails to read a .png or .jpg, campgen should capture that - and it does in most cases - but seem this one is missing. (In Linux, it never causes problems for some reason (different libpng version maybe), and it's some time I last tried it in Windows where the problem also gets triggered.)
Tael_
Posts: 5
Joined: November 7th, 2007, 5:51 pm

Post by Tael_ »

I don't really know how python is working so I think I can't do that. I don't even know where bitmap.cpp is. (I didn't find it in my computer, nor the /BUILD/wxPython-src-2.8.6.1/ folder.)
User avatar
allefant
Units Database Administrator
Posts: 516
Joined: May 6th, 2005, 3:04 pm

Post by allefant »

There is no such file (well, likely it is somewhere in the sources of the wxwidgets dll). But what I'd need anyway is where in the .py files it fails. I'll see if I can figure it out here or maybe next time I get access to a Windows box (no OSX for me unfortunately :/).
Tael_
Posts: 5
Joined: November 7th, 2007, 5:51 pm

Post by Tael_ »

This is just a little thing, but I added an icon to the mac bundle :
http://tael67.free.fr/divers/CampGen_mac_icon.zip
This now look nicer in the dock.
It also contains the modified script like explained here : http://www.wesnoth.org/wiki/CampGenOnMa ... en_on_OS_X.
User avatar
battlestar
Posts: 690
Joined: January 1st, 2007, 7:12 am

Post by battlestar »

When i'm trying to make a new movetype, the "Terrain" category has three subcategories: "type, vulnerability, and cost", but is otherwise empty. Is this a bug?
User avatar
allefant
Units Database Administrator
Posts: 516
Joined: May 6th, 2005, 3:04 pm

Post by allefant »

Yes, seems so. I'll try fixing it.
Mille
Art Contributor
Posts: 350
Joined: May 6th, 2006, 11:48 am
Location: Germany

Campgen

Post by Mille »

Oh man. I wish there will be a windows version again:((((
______________________________
Currently working on SPACENOTH portraits

http://www.exong.net/spacenoth/forum/vi ... .php?t=262
Post Reply