cc@wet.UUCP (Christopher Cilley) (12/08/89)
It used to be, in version 3.x, that nomads were just a pain. They would rampage and you'd have to send armies to pin them down and eventually destroy them. Now, they roam with total freedom. I find that you can send an army of any size against a nomad tribe of any size, under any sort of mode (attack, grouped, etc) and the nomads can just walk away. The only way to have a chance of getting any sort of attack on them is to surround themm with armies so that no matter which way they go they hit one. Of course it's hard to come up with eight 1000+ armies for all the nomads that appear. Why is this a feature now? Or is it just a bug? Or did I screw up something in the config? -- ---------- ---------- ---------- ---------- ---------- Christopher Cilley {ucsfcca|claris}!wet!cc cc@wet.UUCP "Life is uncertain - eat dessert first..." -RJR
michael@stb.uucp (Michael Gersten) (12/12/89)
There is an ****ANNOYING**** "feature" of conquer version 4 that when an NPC nation -- including nomads, savages, and lizards -- goes to run its turn, it gets the present state of the board to work from, not the PREVIOUS state of the board which a user gets. This makes it impossible to pin anybody because no matter what you did, they can always move out. Put another way, if you want to move to place A but an army in B is in front of A, you will stop at B. Whether or not army B is there to stop you when your move executes, you will stop at B. That NPC army B may move out before you get there. Now turn it around. If you move your army B out of the way, the NPC's can now move straight to your army A. I made a simple solution that solves PART of this for nomads, savages, and lizards. Since most of those armies are running around in attack mode looking for something to attack, and since the combat code insures that a combat will occur if one army is in attack mode, I had the nomad/lizard/savage movement code test to see if a combat would occur first before they move. As distributed there is a 0% -- yes, 0%-- chance of a battle occuring in the sector that they start in because they are guaranteed to leave to a different sector. Here's the code I changed. Its pretty simple. Put it in npc.c /* Determine if a fight will occur in sector x,y. Approximate--must be an attacking army (of a real country) in the sector. Currently used for savages etc. FOR NPCs DISPLOMACY MUST BE ACCOUNTED FOR. Check for ispc not isactive -- although npc's should stop us as well, nomads and savages do not. This is NOT used for pirates -- they are navies, not armies. */ fight_scene (x,y, stat) { int country, armynum; for (country=0; country<NTOTAL; country++) if (ispc(ntn[country].active)) /* Taken from combat() -- can combat occur? */ /* for(j=0;j<MAXARM;j++) { /* aptr = &nptr->arm[j]; /* if((aptr->sold>0) /* &&(aptr->stat>=ATTACK) /* &&(aptr->stat<=SORTIE||aptr->stat>=NUMSTATUS) /* &&(!fought[aptr->xloc][aptr->yloc])){ */ /* }} */ /* Also check if this army is attacking */ for (armynum=0; armynum<MAXARM; armynum++) /* Same location */ if (AXLOC == x && AYLOC == y) { /** printf ("Country %d, army %d in sector with someone\n", country, armynum); printf ("Country's status is %d, others are %d\n", ASTAT, stat); printf ("(Attack is %d, sortie is %d)\n", ATTACK, SORTIE); **/ /* They are attacking */ if ( ( ASTAT>=ATTACK && ASOLD>0 && (ASTAT <= SORTIE || ASTAT>=NUMSTATUS) ) /* Or we are attacking */ || (stat >= ATTACK && stat <= SORTIE) ) { /** printf ("Fight occurs\n"); **/ return 1; } else { /** printf ("No fight "); **/ return 0; } /* if in attack mode */ } /* if x and y */ return 0; } The "No fight" section occurs if there are no armies in attack mode in the sector -- it turns out this only occurs with lizard armies in garison mode (some of which may choose to go out and attack neighboring sectors) Then, in do_savage, do_nomad, and do_lizard, the following change void do_savage() { short armynum; int x, y; printf("updating savage (nation %d)\n",country); for(armynum=0;armynum<MAXARM;armynum++) if(P_ASOLD>0){ P_ASTAT=ATTACK; if(P_ATYPE<MINLEADER) { P_ASOLD *= 102; P_ASOLD /= 100; } -->> /* If combat they do not move */ -->> if (fight_scene (P_AXLOC, P_AYLOC, P_ASTAT)) -->> continue; P_AMOVE=(curntn->maxmove * *(unitmove+P_ATYPE%UTYPE))/10; Michael