SGOTM 08 - Smurkz

Where do the 15th and 16th hammers in YSH (pre-bureaucracy) come from? I was only counting 11, not realizing we'd continue to work both hills, but even so I'm only getting 14.
 
A merged GS gives +1 hammer. :)
 
Ah! Now I remember that. Very nice, then.
 
Nice work on the spreadsheets. Looks like we're expecting 3 forests for Angkor Wat--I thought we only had 2 near Rockport? BTW, chopping them will reduce RPort's health, not that we're likely to hit that limit for a good long time.
 
The last extra 30 hammers at Rockport is from the whip, not from a forest chop.

We do lose the health bonus in Rockport, but that city may never even approach its health cap -- it shouldn't be a problem. And it saves us ~ 5 turns on AW.
 
No, I never did. That doesn't mean it isn't possible, but I haven't had time to look into it further, and I don't know when I will get/take that time. I made this sheet because I found it fun, and as such I was happy to take of my spare time to do that. But fighting against a stupid API to get something really simple to work isn't my idea of a good time... :sad:

If someone with more OO knowledge than me would like to give me a hand with it, I would greatly appreciate it.
 
Thanks a lot Chris! Don't hesitate to bug me on IM about anything big or small.
 
Pre-Plan

Research: Music >> Priesthood >> Code of Laws

Note: Research will be set to 0% on turns 119, 122, and 125.

Yo: Galley >> Axe >> Cat (if we get a GS, I will settle it)

Hari: Dumbo (in progress) >> Dumbo >> Dumbo

Harapura: Cat >> Cat >> Cat >> Library

Rockport: AW (in progress and will not complete during my turnset)

Our units converge on tile 1SW of Hara. DOW on t126.
 
... and continue exploring with Jacques and the western galley (being careful not to cut any corners that may reveal new land). Put Wm. Shakespeare on the new galley, dump him safely on stone island (after the axe has scoped for barbs) and then have him fogbust (where exactly?). Then send the new galley to the east side of the northern isles, to fill in the cut corners.

Check for new trades every turn--what's our guiding philosophy if opportunities arise? We have Music to trade...
 
Yeah, like Xc subtly hints, that PPP is a bit on the short side... ;)
 
One thing that shouldn't be missed: on either this turn or the next (would need to check), Harapura works a coast tile instead of the plains hill. If this is missed, we could potentially lose a bunch of hammers down the road, as we're currently scheduled to whip 2 population there a few turns from now with 19 hammers in the box towards a catapult -- no room for error.
 
Niklas, am I reading this right - there are only two macros?

Spoiler :
Code:
Function CalculateYield(NumProd, Fields, Off, OneForTwo)
    X = 0
    If NumProd > 0 Then
        For Counter = 1 To NumProd + 1
            Set currCell = Fields.Cells(1, Counter)
            If currCell <> "" Then
                Set C = Range("Data").Find(currCell.Value).Offset(0, Off)
                Y = C.Value
                If (OneForTwo And Y >= 2) Then
                    Y = Y + 1
                End If
                X = X + Y
            End If
        Next Counter
    End If
    CalculateYield = X
End Function

Function CalculateGPYield(Fields, Off)
    Dim X As Integer
    X = 0
    For Counter = 1 To 6
        currCell = Fields.Cells(1, Counter)
        If currCell <> "" Then
            Set C = Range("GPData").Find(Counter).Offset(0, Off)
            Y = C.Value
            X = X + Y * currCell
        End If
    Next Counter
    CalculateGPYield = X
End Function
 
Correct, those are the only macros I use.
 
OK, it looks like they're coded correctly for OpenOffice Basic. They're pretty simple.

Upgrading to OpenOffice 3.0 solves the runtime problems. Now, as best I can tell, the main problem is that the macros aren't found by the spreadsheets. I'm not entirely sure how to link the code to specific sheets.

Also, I note that you use a variable named speed. OpenOffice seems to think 'speed' is a function... how does that get looked up?
 
At long last, a plan to get Willy to the island:

119willyplan276.png


T119: Galley sails to outside Rockport, and the Axe embarks. Willy moves in the general direction of the desert peninsula south of Hari.
T120: Galley sails northish and the Axe disembarks on the hill due W of the hut. From that location he can see all the island except the forest E of the hut. Willy reaches the embarkment point.
T121: Axe pops the hut. From that location the axe uncovers all of the northern parts of the island. If he sees no barbarians, including any popped from the hut, the galley makes a roundtrip over to pick up Willy.
T122: Willy disembarks on the hill N-NW of the (now popped) hut. From there he covers the whole area. The axe moves W again, and the galley moves 1S and then halts.
T123: Willy moves to the forest on the far SE corner of the northern part of the island. From there he covers all of the land, as well as all of the coast. At that point we will have the whole inner empire complete free of barbarians, and need only fear galleys from the far south and from the northern islands. Our axe can embark the galley again and be sent back south to Rockport. Unless we'd rather send him north to the war...
 
OK, it looks like they're coded correctly for OpenOffice Basic. They're pretty simple.
No. At least not the version used for 3.0. I can list a number of problems with those macros that will OpenOffice 3.0 balk at them, even though I don't know how to solve them. I don't know if 2.4 and before used a Basic compatible with Excel's, but 3.0 doesn't.

- Fields (used by passing a range e.g. A3:I3) is in OO not a Range object that lets you access fields in it, rather it's an array containing the values of those fields. That one I got around (though not in a way that works for Excel too), by looping over the array rather than using Fields.Cells.
- You cannot access a range using Range with a name. I believe the correct function in OO is something like Sheet.getRangeByName though I haven't verified it.
- The function Find doesn't seem to exist for OO, and I cannot find any equivalent in the API docs. I guess I could code up my own, but I fear that would be really slow, and the sheet is already a bit lagging at times.
- All cells are passed by value, not by object. So for instance C.Value doesn't make sense since C is already a value.

Upgrading to OpenOffice 3.0 solves the runtime problems. Now, as best I can tell, the main problem is that the macros aren't found by the spreadsheets. I'm not entirely sure how to link the code to specific sheets.
Yeah, this had me thrown off completely. No matter how I tried to save my edits, when I exited and reopened OO they were gone. I saved them as an external .bas file, but that didn't help me link them.

Also, I note that you use a variable named speed. OpenOffice seems to think 'speed' is a function... how does that get looked up?
That's surprising. 'speed' is a named cell, using the standard naming method (Add menu->Name->Define, may be called something different since mine is in Swedish and these are my own translations). Not sure why it would complain about that. You could try changing it to the literal '$Setup.$B$7' that the name is defined as.

EDIT: I had a quick look at the sheet, I think this is a false error. It doesn't complain about 'speed' per se since the AY column works. So for column AZ it's likely just a followup problem that AX doesn't work, due to the unknown macros.
 
Back
Top Bottom