Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - softcoder

Pages: 1 2 3 [4] 5
76
MegaGlest / 3.5.0 known network problems
« on: 24 April 2011, 04:23:59 »
We have discovered some problems with our network layer and are working to fix these issues and will release a 3.5.1 once we have tested and corrected this (and possibly other important defects).

77
MegaGlest / Block users for network games
« on: 13 April 2011, 14:25:49 »
Inspired by an annoying user from Brazil the other day (you know what i mean, people who quit in the middle of the game and then expect to join your next game and won't leave) I have added a temporary block in the lobby for the server user. Once a network player connects to the game a 'Block Player' button appears for each connected network player. To block this player for the new game only (temporary) click Block Player. To clear all blocked players in the lobby you can click Clear Blocked Players.

Its a sad day to implement this feature, but I knew it would come none the less!

78
MegaGlest 3.5.0-beta2 - come and get it while its hot (svn revision 2053)

!!!! Linux (Debian/Ubuntu) users must have installed the package p7zip-full to be able to install mods in the game !!!!

Changelog:
v3.5.0-beta2

- Menu changes to better group similar items
- Added Blender related tools in blender sub folder
- Modified binary and script names for Linux builds to avoid conflicts with original glest
- Added preview info in mod menu
- End game stats have more info now
- Added more validations for modders for techtrees and scenarios (commandline options)
- Bugfix for OpenAL (now works in v 1.13)
- Updates to Romans faction
- Network messages generated by the game are now displayed in the local users selected language
- Support for custom credits (add the file data/core/menu/credits.txt)
- More AI player improvements
- Default screenshot format is now jpg (configurable in options menu)
- Fixed some performance problems with 'stuck' units
- Scenario preview screen support

v3.5.0-beta1

- performance improvements, now make it possible to play with more units and slower hardware than before.
- new maps with cliffs and higher terrain
- support for sending 7z tilesets and techtrees over network
- new game mod management console to download new game content or remove existing mod content
- multi-threaded pathfinding for better performance when many units are moving
- CPU AI player improvements (units get unstuck more often and stationary air units attack more efficiently)
- new tileset and resource particle support.
- added jpg screenshot support
- optional compressed GPU texture support
- scenario preview logos
- improved harvesting and resource selection
- better support for multiple platform compiling
- Modifiable keyboard hotkeys
- bugfixes for map editor and g3d viewer to work more stable on multiple platforms
- LSB conform ".megaglest" usage



Full installers:

Windows:
Download Here (181.4 MB)
sha1sum 8251476eac1b1f289f0c429a2b429a3e620aa920

Linux 32 bit:
Download Here (228.5 MB)
sha1sum 8851a3123e629d9d1239630545280d61edd6afcc

Linux 64 bit:
Download Here (225.3 MB)
sha1sum fb38e6509489853d31ab32e5ce3c1ed3706efc57



Advanced options:
(click to show/hide)

79
MegaGlest / Sneak preview of the new mod download menu
« on: 29 March 2011, 09:05:04 »
Here is what we have so far (all features work, thats right install and remove mods right from within the game).
Titi is polishing up the UI to include a preview and description of each item.

Items in darker grey are available for download / install, other items are already installed in your user data area.



80
MegaGlest / Current svn code seems to have good performance
« on: 29 March 2011, 06:35:06 »
I think soon we'll put out a beta, but for anyone who is able to compile, please test the latest svn code and let us know how it compares to 3.4.0, there are many changes and I think the new release will be very fun! Our testing so far has proven this next release will be excellent for network games, making better use of hardware and keeping fps higher (hopefully).

Feedback is appreciated (forum trolls keep quiet for now if you can't compile you will have to wait for an official beta post).

Thanks

81
MegaGlest / 3rd party libraries
« on: 20 March 2011, 06:27:45 »
I checked in some changes to svn today so that we no longer need the newer libcurl library, so hopefully this makes things easier for others to compile megaglest now. Likewise the g3d viewer and map editor (and megaglest) should be able to compile using xerces 3.1 as well as wxwidgets 2.9.1 so this will hopefully make it easier overall to compile on other distros etc. Things still continue to work with xerces 2.8 and newer libcurl also, but new libcurl features are not used anymore.

This latest change may fix the transparency bug in the g3d viewer too and make it more stable on more distros.

Thanks

82
MegaGlest / Techtree - finding unused files
« on: 15 March 2011, 15:44:43 »
For good measure I added another commandline option to the techtree and faction validators so now you can see a list of files that are NOT used by your techtree or faction using:

Code: [Select]
./glest.bin -validate-techtrees=megapack
To automatically delete this files you add this option:

Code: [Select]
./glest.bin -validate-techtrees=megapack=purgeunused
Please send your feedback and let me know if there are bugs.

83
MegaGlest / G3D model conversion
« on: 13 March 2011, 08:29:49 »
As of svn rev #1852 there is a new commandline option to convert one or more G3D models into the latest G3D format (v4) which has been the latest version for a long time (most people likely didn't know this). Beyond that, this conversion optionally allows converting all textures in the model to the specified texture format (like png). Doing a sample on megapack cut the entire folder disk size from 823 MB to 775 MB. Also i added more fault tolerant texture loading and better details when error are encountered when loading models.

To convert a faction, techtree or individual file just pass the path to the command like this:

Code: [Select]
glest.bin --convert-models=techs/megapack_new/=png
where the first part after --convert-models= is the path to the model or a folder containing models (this is recursive) and =png is the optional texture format to convert model textures to when saving.

Enjoy!

84
MegaGlest / Partial 7z support for file transfers
« on: 9 March 2011, 19:19:40 »
The current svn code will now look for 7z versions of tilesets when transfering files. Currently the code does NOT create 7z files, the server must already have the tileset i nthe tilesets folder and the file should have the same name as the tileset folder but also contai nthe 7z extension of course. Clients will now first look for the 7z tileset and if found download and extract it. This requires the client to have 7z, for windows users 7z.exe is already in the same fodler where glest_game.exe is placed, for linux users they need to install it if they want this to work.

If this works out we could try sending techtrees or factions next.

85
Bug report / Problem when running in VirtualBox 4.X
« on: 28 February 2011, 20:34:32 »
The current VirtualBox 4.x opengl drivers are very buggy. If you want to run in this environment please install OLDER Guest additions Open GL drivers and things should work ok:

http://download.virtualbox.org/virtualbox/3.2.12/VBoxGuestAdditions_3.2.12.iso

86
General discussion / Glest forks to join forces?
« on: 19 February 2011, 02:27:56 »
Plan:
#1 Both teams finish up their current work and get the code as stable as possible by end of March and release a final version of GAE and MG.

#2. By mid April we will begin work on merging the code into a new project (name yet unknown, please send us your ideas).

#3. our plan is to take the best parts from both projects and make something that everyone can enjoy.

Had a quick discussion with Silnarm on IRC, and the bottom line is that GAE and Megaglest have a good chance of combining into one effort. Please everyone who has thoughts on this show your thoughts, below is a copy if the IRC discussion:

Quote
<softcoder> any thoughts on this post: https://forum.megaglest.org/index.php?topic=6533.msg67087#msg67087
<silnarm> hi, give me a moment..
<silnarm> ok... so how would you propose we went about a 'combined effort' merge ?
<softcoder> #1 do you want to
<softcoder> ?
<silnarm> Yes
<silnarm> _merge_
<softcoder> ok.
<silnarm> not port features to MG
<softcoder> ok, I understand
<softcoder> I think we then need to determine which parts to merge and which to drop
<softcoder> I'm sure on both sides there are redundant pieces so we determine which would be best.
<softcoder> other areas we simple take a file at a time and merge
<softcoder> now if possible.. we could plan it in pieces so that things are still playable and therefore testable
<silnarm> there are numerous architectural differences, that effect many different files.
<softcoder> sure, its not a small task, but like i said if there is a desire now is the time
<softcoder> and it would be worth having one umbrella and effort
<silnarm> so there would be many files that simply couldn't be merged in isolation
<softcoder> yes sections of the code
<silnarm> yes, absolutely
<softcoder> thats why i think we can take slices and detrermine in some cases to ditch some and take others
<silnarm> if we use git, we can put the data in a sub-module, so the core project is 'code only'
<softcoder> yes... we can use git
<softcoder> in the sense of what we are doing and going forward it seems to make sense
<softcoder> ok, an execercise then..
<softcoder> step #1
<softcoder> we need to look at both code bases  to determine how to split
<softcoder> also.. would you have buy-in from GAE members?
<softcoder> and how would you want it hoated etc?
<silnarm> unknown
<softcoder> hosted
<softcoder> ok.. please do that first then
<silnarm> that is another good question
<silnarm> I'll mail hailstone and Yggdrasil to see what they think
<softcoder> ok.. talk to your guys.. I'll chat with titi and lets see what we come up with
<silnarm> what would you suggest in terms of hosting?
<silnarm> new proj?
<softcoder> I honestly don't care
<silnarm> ok
<softcoder> lets take ideas from all involved
<silnarm> yes, that would be ideal...
<softcoder> ok cool, its a long road, but if we work hard together it'll be awesome
<softcoder> the expertise would make a monster of an RTS
<silnarm> agreed
<softcoder> ok, I'm glad... will mail the MG guys now
<silnarm> ok, I'll do likewise.
Stickied and *quoted*! Good Luck! -Ultifd

Edit by Omega: Unstickied and locked.

87
MegaGlest / Some new LUA functions
« on: 29 January 2011, 18:28:25 »
I added the following LUA functions to the svn version which will be released with 3.4:

destroyUnit(unitId)
morphToUnit(unitId,morphName, ignoreRequirements)
moveToUnit(unitId,destUnitId)
giveAttackStoppedCommand(unitId, valueName,ignoreRequirements)
playStaticSound(playSound)
playStreamingSound(playSound)
stopStreamingSound(playSound)
stopAllSound()

The commands taking ignoreRequirements expect 0 for try to execute the command with requirements and 1 to skip requirements checking.

Below is a sample scenario using some of these methods:

Code: [Select]
<?xml version="1.0" standalone="yes" ?>
<scenario>
<difficulty value="3"/>
<players>
<player control="human" faction="tech" team="1"/>
<player control="cpu" faction="tech" team="2"/>
<player control="cpu" faction="tech" team="2"/>
<player control="cpu" faction="tech" team="2"/>
</players>
<map value="in_the_forest"/>
<tileset value="forest"/>
<tech-tree value="megapack"/>
<default-resources value="false"/>
<default-units value="false"/>
<default-victory-conditions value="false"/>
<scripts>
<startup>
print( 'Test, START of Capture the flag!' )
--disable AI
disableAi(1)
disableAi(2)
disableAi(3)
disableConsume(0)

unitA = 'guard'
unitB = 'castle'
captureTheFlagSeconds = 90

DisplayFormattedText('You have %s seconds to move the %s into the %s!', captureTheFlagSeconds,unitA, unitB)

for i=0, 3 do
print( 'Is AI enabled for faction index: ' .. i .. ', ' .. tostring( getAiEnabled(i)) )
print( 'Is consume enabled for faction index: ' .. i .. ', ' .. tostring( getConsumeEnabled(i)) )
end

--allied units
--createUnit('farm', 0, startLocation(2))
createUnit(unitB, 1, startLocation(2))
enemyCastle= lastCreatedUnit()

castleUnit= lastCreatedUnit()
createUnit('worker', 1, startLocation(2))
enemyWorker= lastCreatedUnit()

for i=1, 5 do
createUnit('swordman', 1, startLocation(2))
end

giveResource('gold', 0, 1000);
giveResource('wood', 0, 1000);
giveResource('food', 0, 1000); 

giveResource('food', 1, 5); 

--player units
createUnit('battle_machine', 0, startLocation(1))
battle_machine= lastCreatedUnit()
createUnit(unitA, 0, startLocation(2))
guard= lastCreatedUnit()


moveToUnit(guard,enemyWorker)

createUnit('technician', 0, startLocation(1))
technician= lastCreatedUnit()

moveToUnit(technician,enemyCastle)

createUnit('battle_machine', 0, startLocation(1))
bm2= lastCreatedUnit()

for i=1, 3 do
createUnit('archer', 0, startLocation(2))
test = lastCreatedUnit()
giveAttackCommand(test, castleUnit)
end
for i=1, 10 do
createUnit('swordman', 0, startLocation(1))
givePositionCommand(lastCreatedUnit(), 'attack', startLocation(1))
end

cell_event1 = registerCellTriggerEventForUnitToUnit(guard,castleUnit)
print( 'cell_event1 = ' .. cell_event1 )
cell_event2 = registerCellTriggerEventForUnitToUnit(battle_machine,castleUnit)
print( 'cell_event2 = ' .. cell_event2 )

timer_event1 = startTimerEvent()
print( 'timer_event1 = ' .. timer_event1 )

setCameraPosition(unitPosition(guard))

</startup>

<unitCreated>
</unitCreated>

<unitDied>
enableConsume(0)
enableAi(1)
enableAi(2)
enableAi(3)

for i=0, 3 do
print( 'Is AI enabled for faction index: ' .. i .. ', ' .. tostring( getAiEnabled(i)) )
print( 'Is consume enabled for faction index: ' .. i .. ', ' .. tostring( getConsumeEnabled(i)) )
end

clearDisplayText()

print( 'About to morph unit: ' .. technician )

morphToUnit(technician,'build_air_ballista',1)
destroyUnit(battle_machine);

giveAttackStoppedCommand(bm2,'hold_position',1)
playStreamingSound('/home/softcoder/Code/megaglest/trunk/data/glest_game/techs/megapack/factions/romans_beta/music/romans.ogg')

print( 'Done morphing...' )
</unitDied>

<cellTriggerEvent>
--print('Cell Event ' .. triggeredCellEventId() )
--print( 'In cell event triggeredCellEventId = ' .. triggeredCellEventId() .. ' cell_event1 = ' .. cell_event1 .. ' cell_event2 = ' .. cell_event2 )
if triggeredCellEventId() == cell_event1 or triggeredCellEventId() == cell_event2 then
clearDisplayText()
DisplayFormattedText('You captured the FLAG!')
stopTimerEvent(timer_event1)
unregisterCellTriggerEvent(cell_event1)
unregisterCellTriggerEvent(cell_event2)
end
</cellTriggerEvent>

<timerTriggerEvent>
--print('Timer Event ' .. triggeredTimerEventId() )
--print( 'In timer event triggeredTimerEventId = ' .. triggeredTimerEventId() .. ' timer_event1 = ' .. timer_event1 )
if triggeredTimerEventId() == timer_event1 then
if timerEventSecondsElapsed(triggeredTimerEventId()) >= captureTheFlagSeconds then
print( 'In timer event triggeredTimerEventId = ' .. triggeredTimerEventId() .. ' timer_event1 = ' .. timer_event1 .. ' seconds elapsed = ' .. timerEventSecondsElapsed(triggeredTimerEventId()) )
clearDisplayText()
DisplayFormattedText('Your time ran out of time to capture the FLAG!')
stopTimerEvent(timer_event1)
unregisterCellTriggerEvent(cell_event1)
unregisterCellTriggerEvent(cell_event2)

                    endGame()
end
end
</timerTriggerEvent>
</scripts>
</scenario>

88
MegaGlest / Mega Glest 3.4.0 betas ( Released now )
« on: 22 January 2011, 09:11:25 »
Mega Glest 3.4.0 is released! - come and get it while its hot here:
https://forum.megaglest.org/index.php?topic=6506.0

( modified by titi, because release should be announced in a new topic! )

89
MegaGlest / Updated G3D Viewer features
« on: 20 January 2011, 19:03:09 »
http://soft-haus.com/glest/pictures/G3D/

shows some screen shots, which you can now take directly from the G3D Viewer, you can also change the background color to a custom color as well. This will be released in the upcoming Megaglest 3.4 release.

91
MegaGlest / Update on svn work
« on: 30 October 2010, 02:31:37 »
We have been busy adding some new things in Megaglest! Here is a brief list of what is working in svn:

- Textures are now compressed in video card RAM (meaning better resource usage)
- Screenshots can be saved as PNG,BMP or TGA the default is now PNG and screenshots are queued in
a background thread so there is very little pause when taking screenshots
- Masterserver keeps track of in progress 'published' games for clients using the svn version.
- the AI and your harvesters are smarter is those sticky maps and they ususally won't just stand around
- Player colors in lobby and chat window
- More Performance improvements.

UPDATE:
- Air units now fly ABOVE other units whose height is > 5 (up to a max of terrain height + 15)
- Tilesets can now define each object to have a height:

   <objects>
      <object walkable="false" height="12">

- Air units now fly ABOVE tileset objects whose height is > 5 (up to a max of terrain height + 15)

Example: (using the height of 12 above the screenshot when flying above those trees looks like)



- Air units will NO LONGER morph into land units if there is an object below or deep water below.
- You may now build units with cellmaps that take up no actual cell space using the new property below:

      <cellmap value="true" allowEmpty="true">
         <row value="0000"/>
         <row value="0000"/>
         <row value="0000"/>
         <row value="0000"/>
      </cellmap>

This was already possible if you 'produced' such a unit, but building the same unit type would stop right after initiating the unit. These types of units CANNOT be attacked and allow everything to walk through them. Once again this was already possible via the produce command.

And a big thanks to Bruce who is making great progress creating a Mac bundle of Megaglest!

92
MegaGlest / MegaGlest 3.3.7.2 release
« on: 16 October 2010, 18:31:28 »
Mega Glest 3.3.7.2 release - come and get it while its hot (svn revision 1106)



Full installers: (these are typically for first time users)

Windows:
download here

Linux 32 bit:
download here

Linux 64 bit:
download here

Mac OSX:
Coming Soon...



Binary Updates only: (these are for upgrading the previous version)

Windows Auto Updater:
download here

Windows Self Extracting:
download here

Linux 32 bit x86:
download here

Linux 64 bit x86:
download here

FreeBSD 64 bit x86:
coming soon...



Full Data package (for both linux and windows, intended for new installs [not using the win32 installer], same as 3.3.7.2 full installer data):
download here
!! glest.ini and glestkeys.ini are not included.  They are platform specific and distributed with the binary !!

Upgrade Data package from 3.3.7 or higher (for both linux and windows, intended for manual upgrades  [not using the full installers]
download here



Source Code Package:
download here



Changelog:

v3.3.7.2

- bugfixes discovered in 3.3.7

v3.3.7

- Significant game play performance improvements.
- Added support for FreeBSD (thanks m0ellemeister) and Mac OS X (thanks GeoVah)!
- Players can now tell multiple units to build a new unit all at the same time (multi-build)
- Particle and Transparency improvements
- Map Preview in game lobby
- Added ability to pick a random faction in the game lobby
- Added ability to be a non-player and Observe a network game (becoming an Observer)
- Added ability to change playername in game lobby
- Added new map filter (to display maps with x players)
- AI Player improvements
- Added new LUA functions and events (see wiki for details).
- Added numerous new commandline options (use --help to see a detailed list)
- Improved network performance
- Masterserver PHP scripts will now run on a Microsoft Windows Server
- Added ability to move / size UI components in a custom manner
- Many bugfixes.

93
MegaGlest / MegaGlest 3.3.7 release
« on: 9 October 2010, 01:33:56 »
Mega Glest 3.3.7 release - come and get it while its hot (svn revision 1079)



Full installers:

Windows:
download here

Linux 32 bit:
download here

Linux 64 bit:
download here

Mac OSX:
Coming Soon...



Binary Updates only:

Windows Auto Updater:
download here

Windows Self Extracting:
download here

Linux 32 bit x86:
download here

Linux 64 bit x86:
download here

FreeBSD 64 bit x86:
download here



Full Data package (for both linux and windows, intended for new installs [not using the win32 installer], same as 3.3.7 full installer data):
download here
!! glest.ini and glestkeys.ini are not included.  They are platform specific and distributed with the binary !!

Upgrade Data package from 3.3.6 or higher (for both linux and windows, intended for manual upgrades  [not using the full installers]
download here



Source Code Package:
download here



Changelog:

- Significant game play performance improvements.
- Added support for FreeBSD (thanks m0ellemeister) and Mac OS X (thanks GeoVah)!
- Players can now tell multiple units to build a new unit all at the same time (multi-build)
- Particle and Transparency improvements
- Map Preview in game lobby
- Added ability to pick a random faction in the game lobby
- Added ability to be a non-player and Observe a network game (becoming an Observer)
- Added ability to change playername in game lobby
- Added new map filter (to display maps with x players)
- AI Player improvements
- Added new LUA functions and events (see wiki for details).
- Added numerous new commandline options (use --help to see a detailed list)
- Improved network performance
- Masterserver PHP scripts will now run on a Microsoft Windows Server
- Added ability to move / size UI components in a custom manner
- Many bugfixes.

94
RealtimeFreak pointed out the scenario where AI players would have some units standing around doing nothing. I made a fix in SVN (not included in beta3) that ignores resources that a unit cannot harvest. I have used RealtimeFreaks test mod to test this change and it seems to work properly now. Anyone who builds from SVN should be CAREFUL not to mix this change with rev 1035 (beta3) since it is NOT backwards compatible with beta3 since the AI logic is lightly different to fix this bug.

95
MegaGlest / MegaGlest 3.3.7 beta3
« on: 16 September 2010, 07:49:39 »
Mega Glest 3.3.7 beta3 - come and get it while its hot ( beta3 is svn revision 1035 )

Windows Updater:
download here

Windows Self Extracting Binary:
download here

Linux 32 bit x86 binaries:
download here

Linux 64 bit x86 binaries:
download here

FreeBSD 64 bit x86 binaries:
download here

MacOSX installer
download here

Changelog:

- Significant game play performance improvements.
- Added support for FreeBSD (thanks m0ellemeiste) and Mac OS X (thanks GeoVah)!
- Players can now tell multiple units to build a new unit all at the same time (multi-build)
- Particle and Transparency improvments
- Map Preview in game lobby
- Added abiliuty to pick a random faction in the game lobby
- Added Ability to be a non-player and Observe a network game (becoming an Observer)
- Added ability to change playername in game lobby
- Added new map filter (to display maps with x players)
- AI Player improvements
- Added new LUA functions and events (see wiki for details).
- Added numerous new commandline options (use --help to see a detailed list)
- Improved network performance
- Masterserver PHP scripts will now run on a Microsoft Windows Server
- Added ability to move / size UI components in a custom manner
- Many bugfixes.

96
MegaGlest / Keeping up to date with the development work
« on: 12 September 2010, 23:21:10 »
If anyone ever wonders what is being worked on and checked into SVN (source code version management) for mega-glest just visit the URL below and it should show what has been going on:

https://sourceforge.net/apps/trac/megaglest/timeline

97
Closed feature requests / [DONE] Map Previews
« on: 12 September 2010, 05:21:53 »
I have added an initial MAP preview into SVN in the custom game menu. Please try and give feedback.

98
MegaGlest / Faction Preview in game lobby
« on: 31 August 2010, 15:15:17 »
I have added a mini Faction PReview in the game lobby (in the SVN version last night). How it works is each time the faction is changed for your slot it will load the custom faction loading texture in a small box to the right. This is helpful to identify quickly how the faction looks.

99
MegaGlest / [READY TO TEST in 3.3.7-dev] A few new LUA commands
« on: 28 August 2010, 08:09:53 »
While fixing a bug related to AI players not losing their HP when running out of food, Tiger asked for some new commands so the latest version in SVN has the following LUA support:

void giveAttackCommand(attackerunit, unittoattack)
void disableAi(factionindex)
void enableAi(factionindex)
void disableHunger(factionindex)
void enableHunger(factionindex)
bool getAiEnabled(factionindex)
bool getHungerEnabled(factionindex)
void startPerformanceTimer()
void endPerformanceTimer()
Vec2i getPerformanceTimerResults()   (returns a 2D int array, item #1 is avg updateFps, #2 is avg RenderFps)
void DisplayFormattedText(format, ...)   (prints a message using printf style formatting and NOT using language files)
int registerCellTriggerEventForUnitToUnit(int sourceUnitId, int destUnitId)  
int registerCellTriggerEventForUnitToLocation(int sourceUnitId, Vec2i pos)
int registerCellTriggerEventForFactionToUnit(int sourceFactionId, int destUnitId)
int registerCellTriggerEventForFactionToLocation(int sourceFactionId, Vec2i pos)
int getCellTriggerEventCount(int eventId)
void unregisterCellTriggerEvent(int eventId)
int startTimerEvent()
int stopTimerEvent(int eventId)
int getTimerEventSecondsElapsed(int eventId)
int getCellTriggeredEventId()
int getTimerTriggeredEventId()

events:
gameOver
timerTriggerEvent
cellTriggerEvent

This should make for some very interesting scenarios :)

EDIT (here's an example):

Code: [Select]
<?xml version="1.0" standalone="yes" ?>
<scenario>
<difficulty value="3"/>
<players>
<player control="human" faction="tech" team="1"/>
<player control="cpu" faction="tech" team="1"/>
<player control="cpu" faction="tech" team="1"/>
<player control="cpu" faction="tech" team="1"/>
</players>
<map value="in_the_forest"/>
<tileset value="forest"/>
<tech-tree value="megapack"/>
<default-resources value="false"/>
<default-units value="false"/>
<default-victory-conditions value="true"/>
<scripts>
<startup>
--disable AI
disableAi(1)
disableAi(2)
disableAi(3)
disableHunger(0)

age = 37
you = 17
DisplayFormattedText('I am %s years old. You are %s', age, you)

for i=0, 3 do
print( 'Is AI enabled for faction index: ' .. i .. ', ' .. tostring( getAiEnabled(i)) )
print( 'Is hunger enabled for faction index: ' .. i .. ', ' .. tostring( getHungerEnabled(i)) )
end

startPerformanceTimer()

--allied units
--createUnit('farm', 0, startLocation(2))
createUnit('castle', 1, startLocation(2))
castleUnit= lastCreatedUnit()
createUnit('worker', 1, startLocation(2))

for i=1, 5 do
createUnit('swordman', 1, startLocation(2))
end

giveResource('gold', 0, 1000);
giveResource('wood', 0, 1000);
giveResource('food', 0, 1000);  

giveResource('food', 1, 5);  

--player units
createUnit('battle_machine', 0, startLocation(2))
battle_machine= lastCreatedUnit()
createUnit('guard', 0, startLocation(2))
guard= lastCreatedUnit()

for i=1, 3 do
createUnit('archer', 0, startLocation(2))

giveAttackCommand(lastCreatedUnit(), castleUnit)
end
for i=1, 10 do
createUnit('swordman', 0, startLocation(1))
givePositionCommand(lastCreatedUnit(), 'attack', startLocation(1))
end

cell_event1 = registerCellTriggerEventForUnitToUnit(guard,castleUnit)
print( 'cell_event1 = ' .. cell_event1 )
timer_event1 = startTimerEvent()
print( 'timer_event1 = ' .. timer_event1 )

</startup>

<unitCreated>
</unitCreated>

<unitDied>
enableHunger(0)
enableAi(1)

for i=0, 3 do
print( 'Is AI enabled for faction index: ' .. i .. ', ' .. tostring( getAiEnabled(i)) )
print( 'Is hunger enabled for faction index: ' .. i .. ', ' .. tostring( getHungerEnabled(i)) )
end

endPerformanceTimer()
clearDisplayText()
setDisplayText(string.format('Performance, updateFPS: %d, RenderFPS: %d', getPerformanceTimerResults()[1],getPerformanceTimerResults()[2]))

</unitDied>

<cellTriggerEvent>
--print('Cell Event ' .. triggeredCellEventId() )
print( 'In cell event triggeredCellEventId = ' .. triggeredCellEventId() .. ' cell_event1 = ' .. cell_event1 )
if triggeredCellEventId() == cell_event1 then
clearDisplayText()
setDisplayText('You captured the FLAG!')
end
</cellTriggerEvent>

<timerTriggerEvent>
--print('Timer Event ' .. triggeredTimerEventId() )
--print( 'In timer event triggeredTimerEventId = ' .. triggeredTimerEventId() .. ' timer_event1 = ' .. timer_event1 )
if triggeredTimerEventId() == timer_event1 then
if timerEventSecondsElapsed(triggeredTimerEventId()) >= 7 then
print( 'In timer event triggeredTimerEventId = ' .. triggeredTimerEventId() .. ' timer_event1 = ' .. timer_event1 .. ' seconds elapsed = ' .. timerEventSecondsElapsed(triggeredTimerEventId()) )
clearDisplayText()
setDisplayText('Timer 1 triggered!')
stopTimerEvent(timer_event1)
end
end
</timerTriggerEvent>
</scripts>
</scenario>

100
due to popular request (the modders sitting in my home) we have updated some commandline stuff in Mega-Glest as follows:

Linux:

./glest.bin --help

Windows:

glest_game.exe --help

will give you all commandline options and a description of what they do. For modders you may now control which tech trees and which factions should be validated via commandline. To find out how, run the above command on your operating system from a command prompt (ya ya one day maybe we will show a GUI view for Windows users, but not yet)

Pages: 1 2 3 [4] 5
anything