Posts for Truncated


Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
netwizard wrote:
Hello! Any progress with this wonderful game?
Hi. Sorry, no. I am a bit in on level 2-1 (the elevator) but it isn't really anything to show. Haven't worked on it since July.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
YamiAmarillo wrote:
Thanks guys for the lua scripts, I'll put them to good use when I do more testing
Is this testing going to happen in the near future (so you'll cancel/update this run) or some time later (so I should judge this run now)?
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Aglar wrote:
that effect is sometimes not viable if you watch the run via the youtube video
Aglar wrote:
since the animation lags one frame behind the controller input, it's not viable.
I think you mean visible (synlig), not viable (möjlig, gångbar). Or perhaps you're on your phone and it's just autocorrect. Anyway, yes vote!
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Hello Baruch, I think the most qualified person to do this is you. Don't be afraid to try it out. I see the speedrun was made on Bizhawk, so you're already past the first hurdle. You probably know how savestates work. You can set the key for frame advance under Config > Hotkeys. (I use right shift, don't know what default is.) Hold the buttons you want to record for the next frame, and tap the frame advance button to record them. After that, it's just File > Movie > Record Movie and you're on your way. You can upload the first version here and probably get some suggestions on how to improve it. Good luck!
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
From our Wiki page:
The range of missile projectiles changes depending on direction of fire and angle the unit is at. There are cases where identical unit A can fire on unit B but not B upon A because the extra distance is only allowed upwards/leftwards but not downwards/rightwards. This is because attack distance calculations are performed on the origin point of a unit, its top left corner, instead of its center. The hit box of a unit however appears to be its entire bounding square.
I haven't found this to be the case for units. When I tested full/half damage of trikes, tanks and devastators, their range was the same regardless of direction. However, structures (turrets) suffer from this bug. This is also evident in the source, src/script/structure.c, line 321:
321		/* ENHANCEMENT -- The original code calculated distances from the top-left corner of the structure. */
322		if (g_dune2_enhanced) {
323			position = Tile_Center(s->o.position);
324		} else {
325			position = s->o.position;
326		}
It's possible this bug originally affected units too, and was fixed in 1.07. (The unofficial changes list doesn't mention it though.) Can someone with 1.00 test if there is any case where units cannot shoot as far down/right as up/left?
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Played some more Ordos just for fun. Man, they really get the short end of the stick... there was more disadvantages than I remembered: - They have to buy missile tanks from the Starport instead of building them, but they don't show up there until the mission after the enemy gets missile tanks, so you have to fight one mission at a severe range disadvantage. - They can build Siege tanks, but they also show up a mission late, so you're forced to fight them in one mission with just Combat tanks.
Pokota wrote:
First time using JPC-rr. I keep expecting it to send my keyboard/mouse inputs from the keyboard/mouse and I know that's not going to be correct but it still took me over a minute just to get to the Geidi Prime image.
How is this going? Did you manage to record the first mission? Does it sync on playback? Does sound work?
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Never played this, but I'm guessing what happens after you pick up the red potion isn't the intended behavior. What's going on there?
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Pokota wrote:
I haven't tried Ordos 2 military victory yet.
Tested it now, got 8 minutes. It's possible at least, and could be faster than that. I lost one trike and had another below half health. But probably slower than just harvesting. Positioning your units so you do full damage and enemies half helps a lot when fighting stronger units, such as Raider Trike versus Quad.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Pokota wrote:
It doesn't reset on a new campaign, either, for what it's worth.
I take it you could reproduce it on whatever versions you are running, then? (Which versions?) Did you try Ordos 2 military victory?
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Pokota wrote:
Can you recreate this 1) with a clean scenario.pak file? 2) in other versions of the game? I just tried in 1.00 US with Atreides and the credit decay appears to have foiled it.
Tried it with a clean scenario.pak, with Atreides. Yes it's reproducible. Easy steps: - Start Dune 2 and pick House Atreides. - Almost directly when the first level starts, a credit should be lost. - Options > Restart Scenario. - As the level restarts, you shouldn't lose any credit. Wait until you win. (I don't have any other version of the game.) I think I found the reason for this in the source. It's a combination of these: - Win condition isn't checked until 7200 gametics in: src/opendune.c, line 109 - Upkeep timer is applied every 10800 gametics: scr/house.c, line 71 - Upkeep timer isn't properly reset when loading/restarting a game: src/opendune.c, line 1346
g_tickHousePowerMaintenance = max(g_timerGame + 70, g_tickHousePowerMaintenance);
- Win condition does not check if you go over quota, only that you match it: src/opendune.c, line 149
if (g_playerCredits >= g_playerHouse->creditsQuota)
The first time you start a level, the upkeep timer is properly set. The rest of the times, it isn't. So after you restart the level, the next upkeep cost is 10800 tics in the future, but checking if you won comes before that, after only 7200 tics. Saving and loading also works, if you can sneak a save before the first upkeep cost.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Well, this is odd... I was testing tank vs soldier in the first level (after changing scenario.pak to get tanks) didn't build anything, but my credits stayed at 1000. Suddenly, "Your mission is complete!" I knew that there was a limit of how fast you could beat a level, it doesn't start checking the winning conditions until 7200 gametics in (or something, from memory). But I thought it checked that you have >1000 credits, not >=1000 credits... and normally, there is a sort of upkeep which is based on your power usage, but minimum 1 credit lost every now and then. Guess this variable isn't set properly when saving and loading a game? Or it doesn't happen in the first level? Or this is a bug because I edited scenario.pak? Just guessing. I'll have to look into this. This turned out to be 3 minutes, which is faster than Pokota's movie (at 4 minutes) where there is actual harvesting.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Truncated wrote:
I have never noticed any differences before either, but since all hitpoints and damages are unknown while playing the game normally, I wouldn't be surprised if it was there all along and I just didn't notice.
Tested this some more. The effect is definitely real, and I think I know what causes it. - The code for basically all combat damage is in scr/map.c, function Map_MakeExplosion. Even bullet attacks cause damage by creating an explosion. As you can see on line 431, damage gets shifted right (halved and rounded down) every unit of distance between impact and unit. - The bullets visibly hit off center when attacking from west/east, but dead center when attacking from north/south. - When playing at lower game speed, hits hit dead center and do full damage. It's probably that the bullet travels too far per game tic and passes target between two gametics. Right shift also fits with the numbers I got. Trike 5->2.5->2, Soldier 3->1.5->2. I also tested Combat tank, and sure enough it does 25->12.5->12 when firing from the west. Probably all units with bullet weapons (Soldiers, Troopers close range, Trike, Quad, Tank, Siege Tank and Devastator) are affected. Trooper long range was not affected when I tried it. I'll try to make a map showing which firing positions give half damage.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Pokota wrote:
Dxtory, mainly, as that's how I'm set up. I haven't tried dumping directly from dosbox yet. Which version are you running? I don't remember bullets being screwy with east/west damage.
Thanks. Tried recording a bit, but it's choppy and files get huge. 1.07, The Battle for Arrakis. I have never noticed any differences before either, but since all hitpoints and damages are unknown while playing the game normally, I wouldn't be surprised if it was there all along and I just didn't notice.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Pokota wrote:
I'll give this a shot, but I'm not sure I can pull it off (I play too defensively). Can we get someone else working on this in case I fall flat on my face?
I think it's possible to complete it this way, but almost certainly not faster than harvest victory due to weaker units. I can give it a try though. BTW, what do you use to capture videos when playing? I noticed something else which should probably be looked into. I was experimenting with the Saboteur by giving myself a Palace in Ordos 1. It has 10 HP, and normally my own soldiers should kill it in 4 hits (3+3+3+3 > 10). When shooting from some angles though, like directly west and east, the Saboteur dies in 10 hits, so each hit only does 1 damage. The Raider trikes also deal less damage from some angles, 2 instead of 5. At first I thought this was maybe a peculiarity for the Saboteur. But it's the same for a Soldier attacking a Raider Trike or vice versa. Attacking from the north deals full damage according to our table on wiki, attacking from the west deals much less. This seems very exploitable if we can figure out how it works.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Pokota wrote:
I guess we have a winner. That strat should also work for Atreides to a limited degree, but the Ordos have a construction yard in all variations of that mission. It probably won't for Ordos because Trooper rockets pass over structures and can snipe down the harvester.
I think everyone has a Construction Yard in mission 2 in the version i have, 1.07. At least Atreides does when facing them on Harkonnen 2. I think Nach said the maps we have on wiki are from 1.00. Troopers can shoot over structures, but the Ordos Harvester can mow them down, so it doesn't have to be an issue. Their Raider Trikes are significantly weaker than Harkonnen Quads, though. I checked in scenario.pak, and Harkonnen start with 0 credits in Ordos 2. (Atreides starts with 100 credits in Harkonnen 2.) So if you take down their Refinery before first harvest, they can't repair at all. When you tested harvesting victory, did you play on Fastest game speed?
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Pokota wrote:
If nothing else, it's a good psyche-out. You don't see the Fremen coming until it's too late (how is their spawning determined?) and the player doesn't expect the Sardaukar Inquisition the first time playing.
The Fremen spawning is determined in src/structure.c, line 883, which calls this function:
/* Find a random location to appear */
location = Map_FindLocationTile(4, HOUSE_INVALID);
Map_FindLocationTile is in scr/map.c. Relevant part:
case 4: /* Air */
ret = Tile_PackXY(mapInfo->minX + Tools_RandomLCG_Range(0, mapInfo->sizeX), mapInfo->minY + Tools_RandomLCG_Range(0, mapInfo->sizeY));
So it seems to mean Fremen appear on any free tile on the map. Also, game on, bitches: Turns out the internal clock is not internal - it does not adjust for the Game speed setting. I was playing on Fast, and tried on Fastest now and got 4 minutes. I noticed this when trying a pseudo-TAS on slowest game speed, and got 23 minutes even though I basically did the same thing as before. Strategy: Get the enemy to shoot at his own structures as much as possible, spread out the damage on the quads so none of them get below half health and get reduced firing rate, and sacrifice the troopers to take over structures at the end. The unit lost was the harvester, which I used to drive over soldiers and divert attention. The trikes chase whichever unit comes in range first, and then you can park the Harvester around a corner so they shoot their own building. When it explodes, squish the soldiers and park around the next corner.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Brougt military victory on Harkonnen 2 down to 8 minutes. My great plan to take over the enemy's refinery and build a light factory there was foiled when I found out that Harkonnen have a special condition and can't build light factory until level 3. Was going to try the middle map, since I have done the right one until now, but I see that Nach brought down harvest victory to 5 minutes, so maybe not... EDIT: went ahead and gave it a try. Middle map can be won in 6 minutes by direct attack. So maybe 5 minutes with TAS isn't impossible...
Pokota wrote:
And how do we know the game doesn't change stats on a per level basis? I don't have any hard evidence for that in Dune II, but I know for a fact Westwood did that in various Command & Conquer games.
We don't, yet, though there's strong support for the Sardaukar (and weak support for the Fremen) being derived units if not simply factional rebrandings.
There is strong reason to suspect that Fremen is the same too. I found the code which creates Fremen forces when clicking the palace button (src/structure.c, line 883) and it just creates UNIT_TROOPER/S with the normal Unit_Create and Unit_Allocate functions (used whenever a new unit is created), which also don't have any special code to handle Fremen or Sardaukar. Really, at the moment there is no reason to think they are special. The mentats are wrong on this, just like they are about some other things.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Pokota wrote:
What was your time? I got six minutes just focusing on the harvesting, and that's without micromanaging the harvesters.
I got it down to 10 minutes. Maybe it could be 2 minutes faster with optimal play, getting the Atreides trikes to shoot at their own buildings more, and sacrificing the troopers at the right time, but I doubt it could go down to 6 minutes. (And your movie could probably be improved too.) Next up: testing if Sardaukar and Fremen troopers are really stronger. Edit: Test complete! Sardaukar and Fremen troopers are exactly as strong as Harkonnen troopers, firing as often, dealing as much damage and having as much health. This was tested by editing scenario.pak to put Sardaukar and Fremen troopers in the first Harkonnen level.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Thanks again Pokota! Then it's confirmed that Windtraps work as I described above, 50 is the minimum output. Also, I cleared up the wiki page with correct info about repair facility and building self repair. - Building self repair is not connected to building health. - Repair facility gets double punishment. On low health, the repair speed is lower and repair cost is higher. About mission 2, I think it should be tested if an immediate attack with the starting units could work. Harkonnen Quads and Troopers versus Atreides Trikes and Soldiers, you could bring a Harvester to crush the Soldiers after building two structures and perhaps keep the screen only on your own units so the enemy units fire less often. moozooh: Yes, the harvester needs to be directed, it doesn't seem to try to end its run as close as possible to the Refinery.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Pokota wrote:
E2: Just confirmed power checking with the bare minimum base - the UI is reporting Power I/O properly - I have a need of 60 and an output of 59, and my radar shut down as expected. Just confirmed that Sardaukar have a base HP value of 110 (not sure how to check rate of fire). Repairing appears to be in chunks of 10 HP/Time (so structural repair speed decay is not a thing) To clarify, I've been using Repair to refer specifically to the actions of the Repair Facility. I don't think I made that clear before.
Thanks, Pokota! This made me go back to the source and I realized where I went wrong before. New suggestion: The power output is proportional to health between 50%-100%. If the Windtrap is below 50% health, it still gives 50 power. You could try it by setting two Windtraps to minimum health and see if they can power a base which needs 100 power. Ah, so the repair facility works at the same speed even at low health? I'll see if I can confirm this in source. I was referring to building self repair earlier, so we misunderstood each other. Can you check if buildings repair themselves slower at low health?
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
I should have posted about it I guess. I found the code for build speed, and added it to the wiki page linked in the first post. As you said, it is exactly proportional to building health. That test is very impressive. You have control over the building's health through a script or something? Perhaps you could check if Sardaukar/Fremen troopers have higher health or other stats than other house's troopers? The mentats suggest this but I haven't found anything in the source pointing to that being the case. >Base Defenses follow the same rules as Units when firing from low health - it fires one shot instead of two, and fires more slowly. I think base defenses always fire once, so low health doesn't affect that. >A Windtrap's power output is simply it's health percentage. I thought so too, until yesterday. In the source, it's obvious that power output is either 100 (if health is 51%-100%) or 50 (if health is 1%-50%). There is no inbetween, and the GUI is lying to us. The OpenDune source comments on this behavior and suggests that it's wrong. I haven't found anything to suggest that power outage affects anything other than the radar. The build speed is not affected at least. Doesn't seem like structures degrade faster either, unless degrade due to power loss happens in some other part of in the code than the usual degrade over time.
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Pokota: >Even if you can direct the Fremen, ... Should this be "can't", or can you direct the Fremen in some versions? The one I played Fremen were always AI controlled and attacked the enemy base as soon as they spawned. >The Saboteur is the fastest foot unit ... It doesn't matter, because any base defense will shoot it down in one hit. If there is no base defense, you have already won anyway. (The saboteur also has the habit of running into walls and blowing them up, but that's probably no problem for a TAS.) I predict Ordos Palace just isn't worth building in a speed run. >Construction/Repair speed is adversely affected by structure health, and all structures decay (faster - the House Decay Factor is decay in the absence of a power outage) during insufficient power. This is very interesting info. Do know more about how this works? - How much is building/repairing speed affected? Does 50% health mean 50% building/repairing speed? - Is harvester unloading speed affected? - How does decay when you have power work? I have noticed it, but the hints in the game tells nothing about this. thommy3: The Genesis version could be interesting to see (a topic was started on that a good while back) but it's really a different game with similar mechanics. It doesn't have the same unit stats or buildings, different graphics, different control interface due to lack of mouse...
Post subject: Re: Dune 2 - The Building of a Dynasty / The Battle for Arrakis
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
Glad to see other people are interested too! This question is still unanswered, and I think we need to get answered to get anywhere:
Truncated wrote:
Do we have an emulator which supports it, and can run it at a reasonable speed? I remember this submission talking about how c-square improved mouse support for JPC-rr - is this now included as standard?
If it is indeed playable, a test run for just the first level with whichever house would be a good start, just to see that it works and syncs. Who can do this? Thanks for the info dumps, Pokota. The same info is available in the source, but much less easily accessible. About which house to play and strategy to use: - It's pretty obvious Ordos are the worst. They have a worthless wheeled unit (Raider Trike) the least useful Palace power (Saboteur) and the worst special Tank (Deviator). They can't build the highly useful Missile tank (but a TAS would probably manipulate low prices from Starport and buy them instead anyway). Their only advantage is being able to build both Infantry and Troopers, but Infantry sucks so that's not much help. - After that it's not obvious which of Atreides and Harkonnen would be faster. Harkonnen start with better units in the early missions (Troopers, Quads) and would gain time there. They can't build Ornithopters which have high damage output, but low hitpoints - perhaps they can be luck manipulated to stay alive? If what Nach wrote about bugs with Sonic Tanks not being targeted by enemies, Atreides would roflstomp the two final missions and possibly gain back the time lost earlier since these missions are very long. I don't think the Palace specials play much of a role, Fremen can be crushed with tanks and Death hand probably manipulated into missing. Pokota> Rocket Launcher (orderable from CHOAM, though it's expensive as shit to do so) If I'm reading the source right, ordering units can be up to 60% cheaper and up to 60% more expensive than building them. It's randomly generated, so launchers and all other units can be gotten at a bargain with some luck. Pokota> The layout for the final two missions are static - the penultimate mission has all of two layouts, and the only thing that changes in the final mission is which houses you're facing. Sort of. Check the maps Nach uploaded to the tricks page. The terrain layout is mostly the same (I saw some spice patches in different locations), but building are placed differently. Harkonnen has to deal with more Rocket turrets in the final mission, for example.
Post subject: Dune 2 - The Building of a Dynasty / The Battle for Arrakis
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
I'd really like to see a Dune 2 TAS some time. I recently discovered that people have reverse engineered it, so I extracted some of that info and put it here: Wiki: GameResources/DOS/Dune2 Mostly unit and building stats, since Dune 2 doesn't show that to the player. Nach added other stuff too. What exactly would be needed in order to get it done? (Other than a TASer with lots of time.) Do we have an emulator which supports it, and can run it at a reasonable speed? I remember this submission talking about how c-square improved mouse support for JPC-rr - is this now included as standard?
Editor, Experienced Forum User, Published Author, Reviewer, Experienced player (969)
Joined: 4/17/2004
Posts: 3107
Location: Sweden
As we said about the Pyramid level in our submission:
There was a user in the thread of a previous submission, who suggested that it is possible to skip floors with the teleport. He was unable to figure out how he did it, and we have not had any luck either. Until we see some indication otherwise, we are skeptical that this is possible.
Now, I have stopped being skeptical. User Orkan contacted me a while back saying this was possible, and managed to record a movie of it. In his movie he jumps as high as possible, then teleports upwards, hits a rock and gets bumped a tiny bit upwards to reach the next floor. I tried replicating it to see what makes it work. Normally, the final little bump needed to reach the next floor does not occur. It happens, as it turns out, because of a bug. First, you need to do a diagonal kick (I suspect that a downwards stomp would work too), and get damaged by a rock before landing. When you hit something during a diagonal kick/stomp, you bounce off it, and this state (next hit causes bounce) is not reset properly. This state is kept until you do another diagonal kick/stomp or hit something. After this, you can jump, teleport up and hit a rock (perhaps other damageable objects work too), and get bumped to the next floor. The timing is not even that strict. Here's the BK2 movie where where I managed to replicate it: User movie #26095853500551368 It should save some time. Even with the limitation that it takes some time to set up, and you need to keep yellow health (or else the boss takes twice as long), the first few floors are very long. Orkan also found that the trick to fall through thin floors could be used in the Sentinel levels too. I haven't looked into this yet.