You must sign in to post. | Welcome to Galcon mods! :: Apr 27, 2007 @ 10:10pm |
|---|
philhasseyJoined: Nov 30, 2006 Posts: 671 Location: Zarcon | Hey,
Nothing much to say, but if you're interested in modding Galcon and want some tips or whatever, post here!
I'll be adding the ability to post attachments to messages so you'll be able to post your mods to the forums soon.
Read this for more info:
http://www.imitationpickles.org/galcon/forum/7/301/
Read this to learn how to program in python:
http://docs.python.org/tut/tut.html
(Please note that Galcon only allows a subset of python - no Exceptions and magic things. Just "simple" python code.)
The Galcon API is similar to the pygame API:
http://www.pygame.org/docs/index.html
Especially the Rect objects and the Event objects.
Eventually, I'll post more details about the Galcon API once it becomes more stable.
Have fun!
Philpost updated on Apr 28, 2007 @ 2:35pm | | Re: Welcome to Galcon mods! :: Apr 28, 2007 @ 4:48am |
|---|
assassin437Joined: Jan 29, 2007 Posts: 112 Location: Quantification | Love the map editor Phil, wonderfully easy to use!
Great update, thanks. | | Re: Welcome to Galcon mods! :: Apr 28, 2007 @ 9:30am |
|---|
eckelsJoined: Mar 4, 2007 Posts: 200 | I know you JUST released it, but here are some features i'd like for the galcon mod editor:
copy and paste OR duplicate last planet
grid overlay (toggle on and off) so proper distances between planets can be measured - especially important for two sided or three sided games, where you want an equal playing field.
the ability to add more starting spots than single player - more bots, perhaps (though you probably already are working on this one)
a ship/production calculator. Basically a little list on the side of the screen that says blue starts with X number of ships and Y number of production value, and the same thing for orange. It makes balancing out the starts quicker and easier, when starting with more planets. it would be calculated in real time as you add or remove starting planets.
The editor is really pretty neat, but I think it will really come into it's own when we can play net games on custom boards.
Good Job Phil! | | Re: Welcome to Galcon mods! :: Apr 28, 2007 @ 10:14am |
|---|
philhasseyJoined: Nov 30, 2006 Posts: 671 Location: Zarcon | Hey - well, since the editor is a mod - you can actually work on adding those features :)
Anyway - as for the net game, if I like how the maps are coming together I might allow the net game to use custom maps in the future.
- Phil | | Re: Welcome to Galcon mods! :: Apr 28, 2007 @ 10:53am |
|---|
eckelsJoined: Mar 4, 2007 Posts: 200 | Phil - "since the editor is a mod... you can do it yourself"
Not likely. I'm about as bright as a jellybean when it comes to programming. | | more mods :: Apr 28, 2007 @ 2:04pm |
|---|
jetlukesterJoined: Mar 20, 2007 Posts: 1 | can anyone tell me the link for the Galcon map editor?? I cant find it anywhere | | Re: Welcome to Galcon mods! :: Apr 28, 2007 @ 2:13pm |
|---|
philhasseyJoined: Nov 30, 2006 Posts: 671 Location: Zarcon | The mods section is only availble to registered users. You can get to it via the 'm' key on the main menu. | | Re: Welcome to Galcon mods! :: Apr 28, 2007 @ 2:36pm |
|---|
philhasseyJoined: Nov 30, 2006 Posts: 671 Location: Zarcon | I just updated the starting post in this thread with some helpful links to getting started ... | | Re: Welcome to Galcon mods! :: Apr 29, 2007 @ 12:36pm |
|---|
SirGnipJoined: Dec 27, 2006 Posts: 59 Location: Chi-town | Thanks Phil!
I got the release email last night while at work and couldn't wait to get home to see if it was really gonna be as easy as it sounded to mod Galcon. Well, after about 10 minutes, I had my first "Hello World" bot running! Nice! Thanks tons for opening up Galcon.
Now, I know that modding is in beta and the galcon API is still in flux, but 3 questions:
* What version of Python/Pygame does Galcon use?
* I noticed i can't open a file to log output (I get an exception). Is this intentional? (I do know that "print" logs to the game screen, but was hoping to have a debug log written to a file so I don't clutter the game screen)
* I get an exception when I try to do a "dir" on Galcon's objects to determine their interfaces. Is this also intentional? (or, am I just making dumb mistakes on all these?)
During the beta period, are you providing any kind of support? I don't care either way, I just don't want to pummel you with questions if you're not ready. Spend time developing!
Thanks again, Phil. Tons of fun! And now, even more fun! | | Re: Welcome to Galcon mods! :: Apr 29, 2007 @ 2:54pm |
|---|
philhasseyJoined: Nov 30, 2006 Posts: 671 Location: Zarcon | SirGnip -
Hey thanks for trying it out! I'm very excited to have people play with this :)
- pygame 1.7.x, python 2.4.x - though I may upgrade those at any time. Might not though :)
- open, dir, and *lots* of builtins have been disabled. I've attempted to allow only a "safe" subset of python be usable. Although I won't rec. people to try mods before they have been approved or checked out by a coder, I want them to likely be safe anyways. svn://www.imitationpickles.org/pysafe/trunk if you care to see what you're working with. I've added one or two more Galcon specific limitations - in particular no variables starting with _. This makes it so I can have private variables in the stuff I send to the Galcon mods.
- To do to file logging, just use file_save("log.txt",data) .. the file has a max of 64k though. If it would be very helpful, I could add a file_append() function.
Feel free to ask questions and give suggestions. I'll do my best to answer questions, and think about suggestions. I really want to see a mod community take off here :)
Thanks!
- Phil | | Re: Welcome to Galcon mods! :: Apr 29, 2007 @ 4:22pm |
|---|
splordJoined: Jan 7, 2007 Posts: 21 Location: Saarbrücken | so how do we post the mods?
i've done some editor changes and want to share it :-) | | Re: Welcome to Galcon mods! :: Apr 29, 2007 @ 4:26pm |
|---|
philhasseyJoined: Nov 30, 2006 Posts: 671 Location: Zarcon | splord -
very cool :) I'm going to try to add in an attachment feature to posts in the next couple of days. You could e-mail 'em to me @gmail.com in the meantime if you want.
Thanks!
- Phil | | Re: Welcome to Galcon mods! :: Apr 30, 2007 @ 11:15am |
|---|
splordJoined: Jan 7, 2007 Posts: 21 Location: Saarbrücken | phil, is there any chance, to get a mod possibility for the server? | | Re: Welcome to Galcon mods! :: Apr 30, 2007 @ 11:27am |
|---|
philhasseyJoined: Nov 30, 2006 Posts: 671 Location: Zarcon | splord -
I don't know yet, really. Probably not for a while - a lot issues come into play when doing net game mods:
- fleets have to be sent a certain way for the net protocol to work
- "fancy" features of the single player game (which I'm going to be demonstrating pretty soon here) wouldn't work over the net game (did someone say "moving planets"?)
- custom net games would probably have to be marked as un-ranked, because the rules may be different
- if a custom net game required a user to download a special client mod, that adds more complication, etc.
So for now - I think we're going to stay with playing with the single player mods for a while. But I'll certainly consider it more seriously in a few months.
One thing to keep in mind - if a single player mod is created that is *really great* I may be able to integrate it into the net game myself. The positives of this, is I can ensure consistency across the net games, etc. And basically avoid all the troubles mentioned above.
Thanks!
- Phil | | Re: Welcome to Galcon mods! :: Apr 30, 2007 @ 3:28pm |
|---|
SirGnipJoined: Dec 27, 2006 Posts: 59 Location: Chi-town | Phil,
Thanks for mentioning the galcon.file_save() method. I should have thought to look in the mapedit sample as it obviously did file IO and viola, there it is... | | Re: Welcome to Galcon mods! :: Apr 30, 2007 @ 3:39pm |
|---|
philhasseyJoined: Nov 30, 2006 Posts: 671 Location: Zarcon | SirGnip - well, I'll have to write up the API docs sometime so it's easily referenced :) Right now it's a matter of searching through the examples which is hardly convenient.
- Phil | | Re: Welcome to Galcon mods! :: Apr 30, 2007 @ 5:01pm |
|---|
SirGnipJoined: Dec 27, 2006 Posts: 59 Location: Chi-town | Sure, it may not be convenient. But, hey, its just Beta and we can mod Galcon! I'm happy.... :) | | Re: Welcome to Galcon mods! :: Jun 7, 2007 @ 9:59pm |
|---|
rufiaJoined: Jun 7, 2007 Posts: 2 Location: sherwood park | ok. can unregistered people get to the galcon mods on the main menu by pressing m? or is this just a thing for those registered and paying customers? thanks | | Re: Welcome to Galcon mods! :: Jun 8, 2007 @ 3:58am |
|---|
ashmacJoined: Feb 6, 2007 Posts: 54 Location: Gold Coast | ok. can unregistered people get to the galcon mods on the main menu by pressing m? or is this just a thing for those registered and paying customers? thanks
just for us registered (and sexy) users im afraid ;) | | Re: Welcome to Galcon mods! :: Jun 8, 2007 @ 9:04am |
|---|
philhasseyJoined: Nov 30, 2006 Posts: 671 Location: Zarcon | ok. can unregistered people get to the galcon mods on the main menu by pressing m? or is this just a thing for those registered and paying customers? thanks
if you live in one of those foreign countries where they don't have money, contact me via the contact form (under support) and maybe we can work something out. (Like sending me a box of nice marbles.)
Thanks!
Philpost updated on Jun 8, 2007 @ 9:18am | | Re: Welcome to Galcon mods! :: Jun 22, 2007 @ 2:38am |
|---|
rufiaJoined: Jun 7, 2007 Posts: 2 Location: sherwood park | ok. can unregistered people get to the galcon mods on the main menu by pressing m? or is this just a thing for those registered and paying customers? thanks
if you live in one of those foreign countries where they don't have money, contact me via the contact form (under support) and maybe we can work something out. (Like sending me a box of nice marbles.)
Thanks!
Phil
lol. I don't live in a foreign country with no money...unless you count Canada in there...Anways, I could send you a box of marbles anyway. lol, jk. oh well... | | Re: Welcome to Galcon mods! :: Jun 22, 2007 @ 9:54am |
|---|
philhasseyJoined: Nov 30, 2006 Posts: 671 Location: Zarcon | lol. I don't live in a foreign country with no money...unless you count Canada in there...Anways, I could send you a box of marbles anyway. lol, jk. oh well...
Hey - I'm not kidding. I take marbles as payment. Not those bags for $1 from wal-mart though. Better off sending me your uncle's marble collection from when he was a kid or something. | | Re: Welcome to Galcon mods! :: Dec 2, 2007 @ 2:35pm |
|---|
spunkyJoined: Dec 18, 2006 Posts: 8 | Hey, im looking to do a mod with my schools computer science club, and im heading it up. Were having some trouble getting started. We have looked over some of the code, but its not making a clear picture.
--The first question is, all files import galcon, and we don't know what it is or whats included in it. I looked through the forms and they talk about a galcon API. Is it available yet, or do we just have to look at the existing code to figure it out what is available?
--Next, in main.py files the have a class Game, but it is passed. Where is it defined? Is it in the Galcon Class?
--Next, There are underscores at the ends of variable names, what is the point of theses? Does python intemperate them differently or are they to signify something? For instance, in level.py there is a class of Level_ and Level.
Ok while in the middle of writing this, i stopped and did some experimenting, and i copied the simple mod and did a few tweaks(changing strings and numbers). Does anyone have any small ideas of what we could experiment with to learn how this system works? | | Re: Welcome to Galcon mods! :: Dec 2, 2007 @ 4:47pm |
|---|
philhasseyJoined: Nov 30, 2006 Posts: 671 Location: Zarcon | Some of that stuff is "just how it is" .. the galcon API is explained a bit more in:
http://www.imitationpickles.org/galcon/wiki/Mods_API/
However, your best bet is to just take an existing mod and unzip it or look through the files included with Galcon and fool around with the stuff ..
Give that a try for a while, and if you get stuck on something, I'll try to give more detailed answers.
Phil | | Re: Welcome to Galcon mods! :: Dec 3, 2007 @ 2:57pm |
|---|
SirGnipJoined: Dec 27, 2006 Posts: 59 Location: Chi-town | Spunky, as I was learning the modding system, I threw together a rough UML diagram of the info you have access to in the Galcon API. This shows the most common classes(planet, fleet, player) and what data members and functions are available on each class. A lot of this info came from the link Phil just mentioned, as well as just poking through the code of the existing mods. Here's the diagram:
http://www.imitationpickles.org/galcon/uploads/SirGnip/galconmoduml.jpg
I started out modding by copying the "Classic" mod into a new folder and renaming it. There is a lot of code in "Classic" that you will need in most of your mods (creating a random map, the bot's AI, how to determine when a player wins, etc.). So, copy Classic and start messing with it. I began by tinkering with the code in the classic.py file. For instance, in classic.py, the Level.loop() function is called each time the game updates itself (many times a second). Level.paint() is called each time Galcon wants to draw the screen (so, put code in paint() like this to draw a cirlce that is always on the screen:
screen.circle((255, 255, 255), (100, 100), 50, 3)
Very basic stuff to start with, but this will get you familiar with how the mod code works.
Also, I found it really helpful to add lots of "print" statements so that I could see what the program was doing. If you haven't figured this out already, the "print" command sends its output directly to the game screen.
Feel free to post specific questions.post updated on Dec 3, 2007 @ 2:57pm |
You must sign in to post.
|