NKN
2012-06-03 14:25:26
- Zmon ~ Debug form/Various libraries
- Shay ~ Unknown
- NKN ~ Puzzles
- Xtrapsp ~ Items
- Raskolnikov ~ Unknown
~Will be edited as more information is available.
2012-06-03 14:25:26
2012-06-03 16:23:05

2012-06-03 17:55:16
2012-06-03 18:38:36
2012-06-03 18:40:23
2012-06-03 18:50:46
2012-06-03 18:57:27

2012-06-03 19:27:53
2012-06-03 19:33:41
From: m34tcode
why exactly is this members only. shouldnt all of srl be able to help? :3
2012-06-03 19:40:01
2012-06-03 19:44:35
From: NKN
Zmon instructed me to post it here. :P
I guess it's to keep the "Good job", "Can't wait to test", "Eta?" posts out of it.
Removed as I am still updating 2012-06-03 20:02:55
2012-06-03 20:13:34
2012-06-03 21:00:31
From: xtrapsp
It appears that item detection is slightly off? Even with clear and then Show table Drops (high).
2012-06-03 21:08:26
2012-06-03 22:21:31
From: zmon
yes i think i already mentioned that getminimapdots is not accurate, it is off by pixel or two every now and then and that makes a huge difference so i will need to make it more accurate, plus sometimes it doesn't detect dot on map
2012-06-03 22:32:03
From: Er1k
I think this was mentioned somewhere that it's not our fault but the game's to make the MMdots slightly off a few pixels.
2012-06-03 22:55:47
From: beginner5
Dots have little random offset on MM ,and it's game fault.
But it's not game fault ,that it doesn't find dots ,which are close to each other ,and it can be improved.


2012-06-04 00:10:25
From: zmon
and since that is inside SRL - i'm not sure if we need to report that so someone can work on it but to be honest i suspect that if we are to pull this off, we'll be pushing the SRL team to do work as well :stirthepot:
2012-06-04 00:25:26
2012-06-04 02:16:37
2012-06-04 02:35:32
From: beginner5
This ,doesn't omit any dot on MM and it's more accurate I think. I tested it only like 20 times so more feedback is needed. It's fast as older one.
http://pastebin.com/q98zeZwz
2012-06-04 02:52:25
Function MMBoxToMSBox(Box: TBox): TBox;
begin
Result:= PointToBox(MMToMS(Point(Box.X1, Box.Y1)), MMToMS(Point(Box.X2, Box.Y2)));
end;
Function MinimapDotsToMSBoxes: TBoxArray;
var
ItemsTPA: TPointArray;
ATPA: T2DPointArray;
I, L: Integer;
Boxes: TBoxArray;
begin
ItemsTPA:= GetMinimapDots('Item');
if (Length(ItemsTPA) < 1) then
Exit;
ATPA:= TPAToATPAEx(ItemsTPA, 4, 4);
SetLength(Boxes, Length(ATPA));
L:= High(ATPA);
For I:= 0 To L Do
begin
Boxes[I]:= MMToMSBox(GetTPABounds(ATPA[I]));
end;
Result:= Boxes;
end;
2012-06-04 03:07:09
From: mormonman
I'm almost 100% positive that the only color that is static on the dots is the black.
2012-06-04 03:14:48
From: beginner5
The older one uses static differences.I can easily change it to use tolerance + static differences ,but I was testing dots about 30 times and colors was always the same. So I think it's unnecessary ,unless someone shows me sample with other colors.
2012-06-04 05:47:18
//----------------------------------------------------------------------------//
//-- CheatSheet Item Order --//
//-- --//
//-- Tier Name Member? Armour Weapons --//
//-- 1 Novite NO 1 1 --//
//-- 2 Bathus NO 10 10 --//
//-- 3 Marmaros NO 20 20 --//
//-- 4 Kratonite NO 30 30 --//
//-- 5 Fractite NO 40 40 --//
//-- 6 Zephyrium YES 50 50 --//
//-- 7 Argonite YES 60 60 --//
//-- 8 Katagon YES 70 70 --//
//-- 9 Gorgonite YES 80 80 --//
//-- 10 Promethium YES 90 90 --//
//-- 11 Primal YES 99 99 --//
//----------------------------------------------------------------------------// 2012-06-04 05:49:38
2012-06-04 08:15:30
From: beginner5
The older one uses static differences.I can easily change it to use tolerance + static differences ,but I was testing dots about 30 times and colors was always the same. So I think it's unnecessary ,unless someone shows me sample with other colors.
NPC := [2162687, 1783370, 1437694, 1372665, 1043199, 981753, 786430, 720883, 587000, 522732, 458751, 450798, 393210, 327667, 257009, 255470, 127367, 65233, 61670, 59355, 47302];
2012-06-04 10:06:23
323558
326385
318418
314049
654579
648667
322788
313279
317648
391151
1374705
63478
51142
55511
588280
60651
589823
1179647
589311
579802
584171
578776
574407
583916
717815
1701113
326911
1244415
319972
315603
325112
1702399
575448
579817
584957
718847
50645
55014
783103
1900543
916991
777964
773595
1505535
645348
640979
653311
651775
53474
49105
61439
1179644
56781
61150
65522
196604
2012-06-04 11:58:03
From: xtrapsp
Isn't going to show whats really going on. But I've made a cheatsheet for Armour and Weapon layouts//----------------------------------------------------------------------------//
//-- CheatSheet Item Order --//
//-- --//
//-- Tier Name Member? Armour Weapons --//
//-- 1 Novite NO 1 1 --//
//-- 2 Bathus NO 10 10 --//
//-- 3 Marmaros NO 20 20 --//
//-- 4 Kratonite NO 30 30 --//
//-- 5 Fractite NO 40 40 --//
//-- 6 Zephyrium YES 50 50 --//
//-- 7 Argonite YES 60 60 --//
//-- 8 Katagon YES 70 70 --//
//-- 9 Gorgonite YES 80 80 --//
//-- 10 Promethium YES 90 90 --//
//-- 11 Primal YES 99 99 --//
//----------------------------------------------------------------------------//
I'l slowly be ticking off parts ;)
edit: It's a shame Villavu.com messes up the layout
ones it wont :)
2012-06-04 12:27:16
2012-06-04 12:54:25
From: Brandon
Perhaps something like this for item finding.. A minimap dot is around 12 pixels. Get the bounds of each dot, convert the corners to ms points and search within them for your item.
Function MMBoxToMSBox(Box: TBox): TBox;
begin
Result:= PointToBox(MMToMS(Point(Box.X1, Box.Y1)), MMToMS(Point(Box.X2, Box.Y2)));
end;
Or perhaps try ConsoleWalking and use the methods to find items since its so damn accurate.
2012-06-04 14:22:59
From: beginner5
I didn't notice decrease of speed doing it with tolerance (15 ms).http://pastebin.com/DqSgqreA
I thought before ,that differences change a bit too ,so I made "InRange" ,I will delete it later. Fully independent of black outline. Accuracy is 90% ,sometimes dots close to each other overlaps so much that pixels inside them changes. I will think on it.
Edit: new version http://pastebin.com/A7VxptJ1
Number of colors collected: 77
Number of unique values: 77
COLOR CHANNEL: BLUE
samples: 77
min value: 0 (0)
max value: 32 (20)
average value: 8 (8)
PRESUMED RANGE FOR BLUE IS 0-32 and within this range we have 100.0% percent of samples
COLOR CHANNEL: GREEN
samples: 77
min value: 54 (36)
max value: 255 (FF)
average value: 232 (E8)
PRESUMED RANGE FOR GREEN IS 208-255 and within this range we have 85.7% percent of samples
COLOR CHANNEL: RED
samples: 77
min value: 74 (4A)
max value: 255 (FF)
average value: 232 (E8)
PRESUMED RANGE FOR RED IS 208-255 and within this range we have 89.6% percent of samples
function ColorSame_cts0(ctsInfo: Pointer; C2: PRGB32): boolean;
var C1: TCTS0Info;
begin
C1 := PCTS0Info(ctsInfo)^;
Result := (Abs(C1.B - C2^.B) <= C1.Tol)
and (Abs(C1.G - C2^.G) <= C1.Tol)
and (Abs(C1.R - C2^.R) <= C1.Tol);
end;
2012-06-05 08:28:46
From: zmon
OK i know i am about to doublepost, but i do it rarely so forgive me :P but this does deserve the special treatment
DUDE!!! i put your code under UTILS/Upstream.simba and incorporated it with 3d engine and you just don't know how good your code is until you really see it in action so here - enjoy, it's awesome!!!!!
Edit: i took all the colors that were posted above for NPC and did a little program to analyze them and basically per channel the deviation is $18 or 24 in decimal and so the color is $08E8E8 with +/- $18 per channel (with lower bounds $00D0D0 and upper bound $20FFFF):Number of colors collected: 77
Number of unique values: 77
COLOR CHANNEL: BLUE
samples: 77
min value: 0 (0)
max value: 32 (20)
average value: 8 (8)
PRESUMED RANGE FOR BLUE IS 0-32 and within this range we have 100.0% percent of samples
COLOR CHANNEL: GREEN
samples: 77
min value: 54 (36)
max value: 255 (FF)
average value: 232 (E8)
PRESUMED RANGE FOR GREEN IS 208-255 and within this range we have 85.7% percent of samples
COLOR CHANNEL: RED
samples: 77
min value: 74 (4A)
max value: 255 (FF)
average value: 232 (E8)
PRESUMED RANGE FOR RED IS 208-255 and within this range we have 89.6% percent of samples
EDIT: so after verifying with simba source, basically NPC color is $08E8E8 ( or 583912) with colortolerancespeed = 0 (YES 0) and tolerance 24. Relevant code:
function ColorSame_cts0(ctsInfo: Pointer; C2: PRGB32): boolean;
var C1: TCTS0Info;
begin
C1 := PCTS0Info(ctsInfo)^;
Result := (Abs(C1.B - C2^.B) <= C1.Tol)
and (Abs(C1.G - C2^.G) <= C1.Tol)
and (Abs(C1.R - C2^.R) <= C1.Tol);
end;
2012-06-05 08:51:53
2012-06-05 14:32:20
From: Nava2
So, is there a repository somewhere to be seen? :)
Also, might I suggest using a lot of the library from MSI? It has a crap load of functions built in, there's no need to reinvent the wheel. That being said, it assumes you will open source the dungeoneering script.
From: mika
I can make sps maps
2012-06-06 07:23:40
From: Nava2
So, is there a repository somewhere to be seen? :)
Also, might I suggest using a lot of the library from MSI? It has a crap load of functions built in, there's no need to reinvent the wheel. That being said, it assumes you will open source the dungeoneering script.
2012-06-06 07:47:09
2012-06-06 13:12:11
From: Shatterhand
Nice development. I like that debug console window, looks very useful. How to do that? :)
/////////////////////////////////////////////////
// DUNGEON MASTER //
// [url]http://git.cdn0.com/Git.aspx/dungeon-master[/url] //
/////////////////////////////////////////////////
{$include_once ../CONST/ConstantsMain.simba}
{$include_once ../CONST/ConstantSupportFunctions.simba}
{$include_once ../CONST/InventoryDTMs.simba}
{$include_once ../SKILLS/SkillsMain.simba}
{$include_once ../OUTSIDE/GettingThere.simba}
{$include_once ../UI/ActivityLogger.simba}
{$include_once ../UI/3DEngine.simba}
{$include_once ../UI/ClearAndRedraw.simba}
{$include_once ../UI/LocateItems.simba}
{$include_once ../FLOORS/DungeonFloorSelection.simba}
{$include_once ./Main.simba}
var SelectedAction : integer;
var DebugAngle : Extended;
procedure ThreadSafeCallNoParams(ProcName : String); forward;
procedure InitializeActions(); forward;
procedure PerformSelectedAction(); forward;
procedure DungeonMainDebug;
begin
SmartSetDebug(True);
LogSmartLine('===DUNGEON MASTER===');
// initialize inventory DTMs
InitializeInventoryDTMs;
// initialize 3d debug
DebugAngle := DDD_ANGLE_LOW;
SetAngle(SRL_ANGLE_LOW);
// init 3d engine
DDD_FirstInit();
// do it
InitializeActions();
repeat
ThreadSafeCallNoParams('DebugFormCreate');
if (SelectedAction >= 0) then
begin
PerformSelectedAction();
end;
until SelectedAction < 0;
WriteLn('thank you for using debug version of dungeon master script.');
end;
// form
procedure MainFormClose(Sender: TObject; var Action: TCloseAction); forward;
// debug function events
procedure ButtonClick(Sender: TObject); forward;
procedure ThreadSafeCallNoParams(ProcName : String);
var V: TVariantArray;
begin
SetLength(V, 0);
ThreadSafeCall(ProcName, V);
end;
// actions
type TSelectedAction = record
ButtonText : String;
ExecuteProcedure : Procedure;
end;
var Actions : array of TSelectedAction;
// form parts
var MainForm : TForm;
var button : TButton;
procedure DebugFormCreate;
var Index : Integer;
begin
SelectedAction := -1;
MainForm := TForm.Create(nil);
MainForm.SetBounds({L} 100, {T} 100, {W} 600, {H} 400);
MainForm.Position := poMainFormCenter; // Centre of the Simba window. :-)
MainForm.BorderStyle := bsDialog;
MainForm.CAPTION := 'Dungeon Master: Debug console - choose action';
MainForm.OnClose := @MainFormClose;
for Index := 0 to Length(Actions) - 1 do
begin
button := TButton.Create(MainForm);
button.Left := 5 + 150 * (Index mod 4);
button.Top := 5 + 30 * (Index div 4);
button.Width := 140;
button.Height := 25;
button.CAPTION := Actions[Index].ButtonText;
button.Tag := Index;
button.ONCLICK := @ButtonClick;
button.Parent := MainForm;
end;
MainForm.SHOWMODAL;
MainForm.Free;
end;
// Frees all the bitmaps used in the form
procedure MainFormClose(Sender: TObject; var Action: TCloseAction);
begin
end;
procedure ButtonClick(Sender: TObject);
begin
SelectedAction := (Sender as TButton).Tag;
MainForm.CLOSE();
end;
procedure DoStartDungeon();
begin
WriteLn('Calling: FigureOutWhereWeAreOrStartDungeon');
if (FigureOutWhereWeAreOrStartDungeon()) then
begin
WriteLn('Call to FigureOutWhereWeAreOrStartDungeon returned True');
end
else
begin
WriteLn('Call to FigureOutWhereWeAreOrStartDungeon returned False');
end;
end;
procedure DoInitDungeon();
begin
InitialInitOfDungeon();
end;
procedure DoClearAndRedraw();
begin
ClearAndRedraw();
end;
procedure DoSetDebugAngleHigh();
begin
SetAngle(SRL_ANGLE_HIGH);
DebugAngle := DDD_ANGLE_HIGH;
end;
procedure DoSetDebugAngleLow();
begin
SetAngle(SRL_ANGLE_LOW);
DebugAngle := DDD_ANGLE_LOW;
end;
procedure DoShowTableDrops();
begin
DrawDebugLocations(LocateTableDrops(DebugAngle), clRed);
end;
procedure DoShowFloorDrops();
begin
DrawDebugLocations(LocateFloorDrops(DebugAngle), clRed);
end;
procedure DoShowSmugglerFloor();
begin
DrawDebugSquare(LocateSmugglerFloor(DebugAngle), clRed);
end;
procedure DoShowPlayerFloor();
begin
DrawDebugSquare(LocatePlayerFloor(DebugAngle), clRed);
end;
procedure DoShowNPCs();
begin
DrawDebugLocations(LocateNPCCenters(DebugAngle), clRed);
end;
procedure DoExample();
begin
WriteLn('This is example...');
Sleep(1000);
WriteLn('Example done.');
end;
procedure PerformSelectedAction();
begin
Actions[SelectedAction].ExecuteProcedure();
end;
procedure AddAction(myAction : TSelectedAction);
var Len : Integer;
begin
Len := Length(Actions);
SetLength(Actions, Len + 1);
Actions[Len].ButtonText := myAction.ButtonText;
Actions[Len].ExecuteProcedure := myAction.ExecuteProcedure;
end;
// actions
procedure InitializeActions();
var Action : TSelectedAction;
begin
Writeln('initialize actions');
SetLength(Actions, 0);
// clear and redraw debug screen
Action.ButtonText := 'Clear and Redraw';
Action.ExecuteProcedure := @DoClearAndRedraw;
AddAction(Action);
// this should get us to daemonheim
Action.ButtonText := 'Get to Daemonheim';
Action.ExecuteProcedure := @DoStartDungeon;
AddAction(Action);
// we are inside just doing init
Action.ButtonText := 'Init when inside';
Action.ExecuteProcedure := @DoInitDungeon;
AddAction(Action);
// set angle low
Action.ButtonText := 'Set LOW angle';
Action.ExecuteProcedure := @DoSetDebugAngleLow;
AddAction(Action);
// set angle high
Action.ButtonText := 'Set HIGH angle';
Action.ExecuteProcedure := @DoSetDebugAngleHigh;
AddAction(Action);
// starting room table drops high camera angle
Action.ButtonText := 'Show Table Drops (start)';
Action.ExecuteProcedure := @DoShowTableDrops;
AddAction(Action);
// starting room key
Action.ButtonText := 'Smuggler Floor (start)';
Action.ExecuteProcedure := @DoShowSmugglerFloor;
AddAction(Action);
// starting room key
Action.ButtonText := 'Player Floor';
Action.ExecuteProcedure := @DoShowPlayerFloor;
AddAction(Action);
// show floor drops
Action.ButtonText := 'Show Floor Drops';
Action.ExecuteProcedure := @DoShowFloorDrops;
AddAction(Action);
// show npcs drops
Action.ButtonText := 'Show NPCs';
Action.ExecuteProcedure := @DoShowNPCs;
AddAction(Action);
// add your own here
// example
Action.ButtonText := 'Example2';
Action.ExecuteProcedure := @DoExample;
AddAction(Action);
// example
Action.ButtonText := 'Example3';
Action.ExecuteProcedure := @DoExample;
AddAction(Action);
// example
Action.ButtonText := 'Example4';
Action.ExecuteProcedure := @DoExample;
AddAction(Action);
writeln('got ' + IntToStr(Length(Actions)) + ' actions');
end;
2012-06-06 14:16:57
2012-06-06 14:52:23
From: mika
@zmon
I was just throwing it out there that i can make SPS maps. im good at it and its no problem for me. If needed i can make the maps.
2012-06-08 20:33:03
2012-06-08 21:38:02
From: Yago
What should I work on?
Is there list of some sort of things or areas that need to be written?
2012-06-10 22:57:18
2012-06-11 01:58:30
From: Runaway
Take a look at this: http://villavu.com/forum/showthread.php?t=84315
He's already done 600 items 0.0
2012-06-15 19:08:40
2012-06-15 20:43:52
2012-06-15 22:14:59
2012-06-16 05:09:45
From: Yago
I guess I gotta learn to use skype now.
2012-06-17 17:23:21
2012-06-29 22:11:47
2012-06-29 22:13:44
2012-07-04 17:31:25
2012-07-06 07:59:30
2012-07-09 23:54:44
2012-07-10 14:35:34
2012-07-10 17:00:38
From: zmon
but i was reading up more on dung on wikia because i am mulling over how the actual engine should work, i mean suppose we have support for anything and everything already, we still need something that decides whether we sell stuff to buy ore to make weapons for example…
2012-07-19 10:57:03
From: Runaway
I say charms should be the only thing sold. They are stackable and the smuggler pays quite a bit for them compared to other things. That would make the looting system much more simple as well; would only have to pick up charms and food :)
2012-07-20 13:06:54
From: zmon
well… it's like this… if you cannot for example use high level wood for fletching, because you can't use the bow, then you don't need it. same with a lot of other resources.
so the point would be to mark your inventory as keep/maybe/sell and of course it would be preferable to use high alchemy as you get 2x the amount of coin you would receive from smuggler.
but there are items that you just cannot use and those should not be kept, instead they should be converted into coinage
it is a little bit more complicated if you allow potions that raise stats to be considered as well and the thing is, we aren't solving this to provide most optimal solution, we just need a good solution so potion abilities will not be considered when determining inventories
2012-08-25 13:59:34
2012-08-25 14:08:12
2012-08-25 15:20:57
2012-08-25 15:58:10
2012-08-25 16:35:28