War1gus scripts restructure.

Asked by Travis

I was looking through the war1gus and wargus scripts today. The coding is completely different in war1gus scripts compared to the wargus ones. I would like to have it so they could be the same coding style so as to be consistant. I have a lot of moments where I get kicked out during play or when a level loads. Plus peasent/peon animations aren't working very well - no gold sack or lumber carrying being done when the peasent/peon is loaded with a resource.

Would this be something that you are working toward Tim?

Question information

Language:
English Edit question
Status:
Answered
For:
War1gus Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
timfelgentreff (timfelgentreff) said :
#1

Travis: I have no plans to restructure the code to be more like wargus (which isn't very well factored, imho). The structure I am trying to add in war1gus saves me lots of copy pasting and typing, by taking advantage of the fact that most units and buildings need the same default arguments and are defined twice (once for each race).

The idea behind the specs pattern I use (for spells, units, upgrades, and buildings) is that you should only need to specify the differences, not the common stuff. And because our two races really aren't very different, I see no reason to have separate unit/sound/spells/upgrade definitions for them.

As for crashes: I have just finished playing through the human campaign on my windows machine. On the linux machine I get segfault if more than one peasants is idle (player.cpp:820 in UpdateFreeWorkers). The second time it tries to push to that queue it segfaults on Linux (but not on Windows - on windows I can step through that loop just fine). I have no idea what's going or why the second push_back would fail, I'll debug it when I have time.

Revision history for this message
Travis (dinky-dye-aussie) said :
#2

I get the exact same error on my windows machine that you do on your linux machine - segfaults on line 820 of player.cpp. I can't play any missions that have more than one peon/peseant when you initially load up the level - which means more any level higher than 4 on orc or 3 on human.

Hope you get it sorted man, you've made so much progress already, you've doing a great job!

Revision history for this message
timfelgentreff (timfelgentreff) said :
#3

Can you help with this problem?

Provide an answer of your own, or ask Travis for more information if necessary.

To post a message you must log in.