Dune Wars Mod

What is the python error? Can you post it?

Here it is.

Code:
Traceback (most recent call last):
  File "CvScreensInterface", line 87, in showTechChooser
  File "CvTechChooser", line 112, in interfaceScreen
  File "CvTechChooser", line 786, in updateTechRecords
AttributeError
: 
CvTechChooser instance has no attribute 'sTechTabID'

ERR: Python function showTechChooser failed, module CvScreensInterface
Traceback (most recent call last):
  File "CvScreensInterface", line 945, in handleInput
  File "CvTechChooser", line 1102, in handleInput
AttributeError
: 
CvTechChooser instance has no attribute 'sTechSelectTab'

ERR: Python function handleInput failed, module CvScreensInterface

When I turn off python alerts, I still get the behavior that when I click in the tech chooser screen (F6), nothing happens. I suppose it is playable by waiting for each tech to expire and then choosing in the popup instead of using F6; but it is certainly a major problem.
 
hey guys,

sorry , been a bit busy,

i will merge all of the changes you guys did, and as usuall ill reffer to everything you worte.

ive been working a bit on the corporations, so far so good.

koma - cant wait to see your work, im sure its great.

blade,
glad you love it,

i hope that with in a few more days, ill release an official patch that will basically change most of the things in version 1.

gnite guys.
 
I took koma13's patch, edited the unitinfo so that all the hover and carryall units have bCanMoveAllTerrain, and verified that hover units can be built in landlocked cities and can, in fact, travel on all terrain. That works, and it is a big step forward! We do not need the land model anymore!

However, I am afraid I have reached "patch overflow". I am overlaying my mod from a few posts back, with the original patch 5, with koma13's dll (only), in different combinations. In addition to occasionally losing track of which overlays I have at any time, I am also getting some random CTD's. The following new issues apply to patch 5 regardless of which overlays are used. However, I think I will stop hurting myself with these different patches, and wait until a new *version* comes out. I hope it will have koma's ocean patch. If any of my own python work gets in the way of the new version, please feel free to remove it; I can see it may be difficult to merge, and I can add it back in the next version.

86. Water-Springs gives, "Allows commerce on rivers" due to flag bRiverTrade. This does not make much sense; please set it to zero.

87. The Weather Scanner building gives +1 food on desert due to flag SeaPlotYieldChanges. I don't think it should give food; perhaps it should give an additional gold to represent easier harvesting of spice. The same thing applies to the Fedaykin Monument with GlobalSeaPlotYieldChanges.

88. I have found that exploration is very limited with the changes I have suggested. It is easy to get up to turn 200 without having contacted any of the other civs. I made the workboat move 1, and put it under hovering. That means there is no early game unit which can move on coast at all. For now, I took the desert scout unit and put it under desert suits technology. I also prevented it from moving into ocean. That way at least you have some fast unit which can explore. It starts with stillsuit, so it starts with move 3; you may want to remove that or not.

89. The light hover unit should not be able to move into deep desert. It should be put back to DOMAIN_SEA, with bCanMoveAllTerrain set, but a TerrainImpassable on ocean.

90. I did not check exhaustively, but goody huts appear to pop some very strong technologies. I got Climate Control and Cycle of Arrakis, both 5th tier techs, from goody huts. Also Sand Metal, I am pretty sure. This is controlled by flag bGoodyTech in techinfos.

91. In the current version of windtraps which I put into my patch, I was using a workaround for a limitation of RevDCM. I converted the "fallout" feature into "fresh water". This will look strange if you go into the late game and launch a nuclear missile. Instead of causing fallout, it will spread fresh water. I have fixed this with a new featureinfos file and a change in the python. I can add that after the next version.
 
I took koma13's patch, edited the unitinfo so that all the hover and carryall units have bCanMoveAllTerrain, and verified that hover units can be built in landlocked cities and can, in fact, travel on all terrain. That works, and it is a big step forward! We do not need the land model anymore!

I made a few ai autoplay games and ai is using dropship as a transporter for naval invasions. :) In one game it even manged to conquer a city on another continent. I disabled some python comp (sandworms...) to make sure ai can handle dropships (there is a 'safe path' condition in better ai).

However, I am afraid I have reached "patch overflow". I am overlaying my mod from a few posts back, with the original patch 5, with koma13's dll (only), in different combinations. In addition to occasionally losing track of which overlays I have at any time, I am also getting some random CTD's.

Here is my complete dune wars folder (but without dune-art.FPK and no sound addon):
http://rapidshare.com/files/241009058/dune_wars.rar.html

It is working fine for me, no python exceptions or CTDs.
 
hey guys,

your right david, im sure you have some confusion with the patches,

ill be working today on a full patch with all what you guys made,

if you guys prefer - i can release it as a new version - 1.1,

of stick to a patch 1 (official).


*********

wow koma!!!

the terrain looks just perfect! i love it -its so dunish! well done! and thanks you so much for the drop ship!!! i hope this will upgrade our mod greatly - and perhaps we can get maniac to help us some more with this issue!

superb work.

david allen -
great work as well!
great windtrap code its so cool! great great idea!

one things though,
is there a way to reduce the windtrap area of affect? its now something like 4 tiles each direction right?
i think its should be a bit less - like 2 tiles,
where can we change this?

absolutly fantastic work you guys,
now we can really see some dune style in the mod!

im off to build the official patch - hope to release tommorow - first ill release it as unofficial 7 - so you guys can check the spuce unique
corporations.
its works like that:
each civ can build on game start the unique corporation building, this corp - cannot be spreaded or have agents, its supplies levels of commerence per spice consumed.
if you loose a city with with the headquarters - you can just build it again in another city .
i gave it some bonuses to get the ai to build it , so its working.

also -
i will now raise the appeanece of spice, along with the ai's attitude to it.

how to you suggest i set the new dropship system -
should i just replicate its new properties to the carryall units?


***
one more about the windtrap,
i see its only on hills and mount', very good idea.

but wont it slow down the spread of cities a bit? for game start - cicites can only be build near high ground - or else it wont have enough food res right?

i still havnet seen the thumper at work - does it do its purpose?


koma,
since you like desert hills - how about a new feature? desert dunes - like planetfall have sea fungus and sea kelp features - we will have desert dunes.

david,

i hope i didnt got confused with all you updates, plz make sure i got the most updated ones in the next patch.

thanks guys!


***
david -

why did you removed scrub fallout??
 
if you guys prefer - i can release it as a new version - 1.1, of stick to a patch 1 (official).

Given the number of times I have uninstalled and reinstalled, I definitely vote for a full version rather than a patch. Also, if it is possible to release it as a zip or rar, that would be better; occasionally I mess up a file and I need to grab just one file out of the release. With an exe, I have to unpack the entire thing into a scratch directory.

is there a way to reduce the windtrap area of affect? its now something like 4 tiles each direction right? i think its should be a bit less - like 2 tiles, where can we change this?

I did not do anything special for this. Think about it as a buildable oasis. It gives fresh water in the square it is built, and every adjacent square. I can't think of a good way to make the area of effect either larger or smaller.

how to you suggest i set the new dropship system - should i just replicate its new properties to the carryall units?

The great thing is, all you need to do is add bCanMoveAllTerrain to the DOMAIN_SEA units. Please make sure light hover is treated the same way as the others, you had made it special as an experiment. Also, please remove the dropship unit itself, since it was just there as a proof of concept.

one more about the windtrap, i see its only on hills and mount', very good idea. but wont it slow down the spread of cities a bit? for game start - cicites can only be build near high ground - or else it wont have enough food res right?

There is also a "city wind trap" building which has the same effect. I agree this effect may need to be tuned a little more, but right now, I actually get a much larger effect from having a tubers square nearby compared to adding irrigation. So I do not build irrigation on a plain arid square very often. Just like in vanilla, you do not need fresh water to build a farm on a food bonus like corn or wheat.

i still havnet seen the thumper at work - does it do its purpose?

The thumper doesn't do anything on its own. You have to get a unit with the thumper promotion, first of all; then you have to use the action button. The AI doesn't use it at all. The basic mechanic is there to attract worms, but in a future release we can probably think how to make it a stronger part of the game.

why did you removed scrub fallout??

At the time, the only way I could make the magic oasis feature work was by reusing one of the existing features. I chose to reuse fallout. It looked a little silly to have workers get an action to remove fallout when standing on a windtrap. I have figured out a better way with a few changed files. But to avoid stalling version 1.1, let's go with this as a "known bug" for version 1.1. I can give you an improved set of files for patch 1.1.1.
 
david,

1. sure, zip it will be.

2. version 1.1, ok then.

3. already changed the improvements and the windtrap, now you can build4 tiles away, also now the ai uses wintral lvl-1-3, renamed them to turbines and only on land .

4. ok so - should i give all terrain to the later carryalls then? and yeah ill remove the drop ship.

5. the bulding supplies water ? for the near tiles ?

6. thumper, still its cool, even without ai.

7. shouldnt i just add scrub fallout?...
 
4. ok so - should i give all terrain to the later carryalls then?
Yes, I think so. Flying units should be able to cross deep desert.

5. the bulding supplies water ? for the near tiles ?

Yes, the city windtrap is identical to the improvement.

7. shouldnt i just add scrub fallout?...

You can add it, but it will look funny. Workers standing on a windtrap will have an action button to remove fallout, which will remove all the fresh water. I recommend to leave it out for now, and we can fix it in patch 1.1.1.
 
4. ok so - should i give all terrain to the later carryalls then? and yeah ill remove the drop ship.

Just make sure it has the correct unitai (UNITAI_ASSAULT_SEA). And when you add new stuff you have to check that it doesnt break naval invasions.
 
After you add someting new to dune wars, just make a quick ai autoplay and look if ai still uses transports to attack cities in other areas.
 
koma,
can you recolor the spice resource?
cause on your new terrain - the spice is invisible...

Sure. Give me a few minutes. :)


EDIT: Ok, maybe not that beautiful but at least its visible on all terrains:
 
Spice Economy

I read up on spice at wikipedia. The "Little Maker" article has the best description. Fremen were able to mine spice manually throughout history. The best way to mine it is to wait for a "spice blow", like a small volcano, and find the rich spice deposit right afterwards. With technology, they would airlift a harvester there, collect until wormsign was spotted nearby, and then flee.

I am not sure how to fit that into a Civ mod. The airlift unit is late in the game, but we want to make spice mining important throughout the whole game. We can make desert generally give a high gold value (see 81 below). We can make the existing spice bonuses give pretty high gold, but deep desert ground units don't appear till mid game.

One thing I can do, after we get the windtrap integrated, is write some more python which will make "spice blows" randomly appear. There is a tornado minimod I can use. After the spice blow, a valuable bonus should appear. I was thinking that this bonus could remain for a number of turns and then disappear. But if we want some kind of "spice victory" based on controlling spice output, having them appear randomly may be a little frustrating.

I guess I am not really sure how to proceed on that. Any thoughts?

Hey guys. I'm re-reading the original book as research and I really think spice harvesting is one key feature that has to be present in this mod.

Personally, I think the way Westwood did it in Dune 2 was really faithful to the book. The harvester is ferried to and from the spice field by the carryall. You could see the wormsign as a ripples in the sand. Occasionally, you'd lose a harvester to a worm.

I think just having a passive resource or making a spice bonus doesn't do enough to capture the Dune theme, but I recognise that this is a Civ 4 mod not an RTS.

Some points on spice:

1) I think spice should be so important that it should possibly replace gold as the currency in the game. The only source of this currency is harvesting spice. This makes spice harvesting a vital and strategic part of the game. If you don't look after spice production then you will have no means of doing anything. The spice must flow...

2) The limiting factor on spice production in the book is that it is dangerous, due to storms, worms and the harsh conditions of the desert. How can this be modelled in game terms?

3) Is there anyway we can make spice something that has to be physically harvested from tiles? I like the spice blow idea - that is thematically strong. I am planning out worm animations at the moment and my plan is that the worms Idle and Run animations will just be a ripple in the sand. The fortify animation (which happens just before an attack) will be the dramatic burst through the sand in a cloud of dust. If we could actually have the worms and the harvesting linked so that occasionally you get a pop saying "There is wormsign near your harvester", and you can pick it up provided you have a carryall nearby, that would be great. Like they mentioned on the modcast, it is not much fun to have a pop up saying "One of your units was eaten by a sandworm" - there has to be at least the possibility of saving it.

3) On one hand you can make spice harvesting so abstract that there is no sense of the Dune theme. On the other you could make it faithful to the book and detailed like in Dune 2, but perhaps be left with a lot of dull micromanagement and an AI that has no clue what to do. Hopefully, there's a nice balance to be found though. I would rather that spice harvesting be something important, that the player has to be actively involved in, rather than something that just happens passively. This might be the difference between a game that just feels like Civ 4 with desert and future units, and something that really feels like you're inside the Dune universe.

4) All factions should start with a certain number of units, harvesters, carryalls, ornithopters allowing them to harvest the spice. This is consistent with the book where the Atreides inherent a limited amount of spice harvesting equipment when they come to Arrakis. These units should wear out after a time due to the harsh weather conditions - every mechanic unit should have a limited lifespan since the Dune environment is unbelievably harsh. Factions cannot build there own havesting units until they have the requisite technologies. I think there should be an equipment deprecation lifespan on mechanical units - it helps with the theme and could add an interesting dimension to strategy. Maybe units only wear down when they are outside cities.

5) Regarding a spice victory, controlling Dune and controlling spice production is one and the same thing. It would be hard then to separate a domination or conquest victory from a spice victory. Perhaps if there is a more sophisticated spice harvesting model, then you could get a victory for hitting a particular target.
 
Excellent discussion topic! The upcoming worm animations sound awesome.

One of the challenges for a Civ-based game is the timescale of the game. In a vanilla civ game, you go from no civilization/technology up to the modern era. If you look at the tech tree for dune wars, it is set up similarly. The technology to even build carryalls is more than 2/3 of the way down the tech tree. That means for the first 2/3 of the game, you do not have carryalls.

If we use this approach, we need to consider how prehistoric fremen would have harvested spice before they had carryalls. One could argue that there *were* no prehistoric fremen, obviously they had space travel technology to get there in the first place. For me, this type of technology development is the interesting part of a Civ game. Your mileage may vary, of course.

Another approach may be closer to a RTS-type game where you start out with enough technology to build carryalls and harvesters from the start, and the tech tree is limited to how big a cannon you can put on your tank.

I think we have come a long way in the 2-3 months since this generation of the mod started; this is the first Dune mod to actually get up to a release. There is certainly more discussion we can have about how to Dune-ify it. Having a real worm unit will help a tremendous amount. We have now conquered the question about modeling the deep desert with koma13's new sdk. So spice economy, throughout the tech levels, seems to be the remaining open issue. Keldath has described around pages 7-8 of this thread, his concept for a spice economy based on corporations. Let's see how that looks when version 1.1 comes out, and then continue discussing.

I had thought of a setup with control points, each control point being one spice resource, and a spice mastery victory would come by controlling all these points. But spice blows are random, so a fixed set of control points does not seem right. Randomly appearing control points also seems like a bad idea, a player could get screwed by bad distribution of the points. And I am not sure how to do "low tech" mining of spice if there are random deep desert spots.

Maybe the spice mining part doesn't come into play until the late game; but I have successfully won small size games by vassalizing all the other AI civs before even obtaining carryall technology.
 
3) Is there anyway we can make spice something that has to be physically harvested from tiles? I like the spice blow idea - that is thematically strong. I am planning out worm animations at the moment and my plan is that the worms Idle and Run animations will just be a ripple in the sand. The fortify animation (which happens just before an attack) will be the dramatic burst through the sand in a cloud of dust. If we could actually have the worms and the harvesting linked so that occasionally you get a pop saying "There is wormsign near your harvester", and you can pick it up provided you have a carryall nearby, that would be great. Like they mentioned on the modcast, it is not much fun to have a pop up saying "One of your units was eaten by a sandworm" - there has to be at least the possibility of saving it.

Missed this point before. That is actually working in the mod today. Worms are normal barbarian units that wander anywhere except hills and peaks. You can see them wandering and you can use fogbuster units to see them coming from further away. If they come within sight range of any units, improvements or roads, they are highly likely to move towards them and attack. Worms can destroy any improvement, or road, as well as units. I have not done anything special with attacking against units; it uses normal attack mechanics.

If you see a worm coming, you can plant a thumper. If a worm sees a thumper, it will pick that as the highest priority to move towards, and attack. So you can lead a worm away by planting thumpers, and if you don't have any thumper capable units, you may lose whatever you had there. If you happen to plant a thumper and there are no worms nearby, then there is a good chance that after 3-4 turns, a worm will appear on its own and destroy the thumper. Thumpers disappear after 5 turns if they are not destroyed. I was thinking that certain promotions would make a unit able to capture the worm, and convert it into a Worm Rider unit.

There is a lot more that can be done with worm AI. It is a separate python function so it can be easily modified in the future.
 
Spice economy as RTS resource collection

Deliverator's writeup has made me think of a mechanic which might work for spice. I am not sure if anybody will like it. It is something which can be implemented mostly in python. Oddly, the parts I do not know how to do will hurt the player, rather than hurting the AI.

Suppose we have three bonuses: trace spice, spice, and concentrated spice. These do *not* appear on the initial map. Randomly, spice blows (tornado effect) appear on the map in deep desert (ocean) or coast squares. After 1-2 turns, the blow happens. Any units nearby are damaged. But in that square and each adjacent square, some of the spice bonuses appear, a random mix of the three strengths. As they are worked or harvested, the stronger bonuses convert into weaker ones and disappear. So spice patches will appear, get weaker, and vanish continually throughout the game.

If there is a city near the blow, the city can "work" the square and get a sizeable gold income. There is a worker type unit, "spice collector", which can travel to distant spice blows. This unit has a "collection bag". Each turn the worker is on a spice blow, it fills up by one quarter. When it is full, the collector can return to a city. A collector in a city automatically empties its bag for 40 gold. (We can tune this, but it should be a considerable amount.) The collector can be captured like a worker, and its bag stays intact. So you will want to guard your collector.

I have done this exact mechanic of a bag which fills up only in reverse. See the Fury Road concept of limited gasoline. In that case, each time a vehicle moves it uses up part of its fuel tank, until it can be refueled by a tanker truck.

Now, you may object that this is an RTS type of collection task, which is not Civ-like and requires micromanagement. I agree. But it is very Dune-like. As long as we keep the spice collector as a separate unit (not just another task for the standard worker unit) I can easily write AI which will automate the collector's activity. For the player, you could set a collector to auto-collect, like you can set scouts to auto-explore. I don't know how to do that part, but we can probably figure out how to attach the AI to a player unit with the automate button checked.

I think the initial unit would be a foot unit. I can see a hover unit which would have faster move, could reach deep desert, and would generate a bigger bonus when it returns. Then the biggest unit would only be liftable by carryall. You could load the foot unit onto hover transports too. I am not sure I could write the AI required to use carryalls and hover transports for this effectively, since that involves cooperating with the other AI routines that may want those units for military reasons. But the hover collector I could definitely automate.

I am not sure how this could lead to a spice *victory*, since you could not completely prevent the other players from reaching the random blows. But the game could keep a statistic of how much spice each player has converted at a city, summed up over say the last 20 turns. This could be converted to a percentage. If one player is converting the *majority* of the spice, say 90%, for a while, we could judge that to be a spice mastery win.

What do you think? The spice blow appearance code will take only a few hours, the code to perform the collection a few days, and the AI for the collector another few days.
 
Well spice can be another commerce. That is what I was trying to say. A whole new commerce produced by corporations or things maybe. Just thought commerce would be the product after manufacturing.

Could add spice as yield instead. But either way would need to see how the AI handles them.
 
Spice economy as RTS resource collection

I like this idea - not just because its good thematically, but also because it is good for mods to have unique mechanics - providing they are fun to play. It would be good to have a harvester unit in the mod too.

A little update on the worm. I've got the hang of rigging and have added a skeleton to my latest worm mesh. Having plenty of links in the spine allows me to create some good worm-like postures. The next step is to get my first animation out of blender and into the game following Coyote's tutorial. This is a such a key unit for Dune that it is worth spending some time on.

attachment.php
 

Attachments

  • wormrig.jpg
    wormrig.jpg
    41.5 KB · Views: 249
Back
Top Bottom