|
UAS2
Sept 26, 2015 17:52:42 GMT
Post by Admin on Sept 26, 2015 17:52:42 GMT
Hello, I have mainly created this forum for people who are interested in the development of UAS2. As i've noticed the old forum of madoshi has been shut down(?) and i thought i could create a new one for everyone who's interested I will therefore link a page to where you can download the current UAS2 and put some information on how to use and install it below. github.com/drudgedance/UAS2This includes the client, server, and the source code with the latest changes. The client should be able to be run from any location. In order to run the server, you'll need to import the uas2.sql file into a database named "uas2" (I'll add a howto at the bottom of this post for those that need a guide). Run the server executable and connect it to your database. Then you can run the UAS2 Launcher from the client folder to launch the game. Note: If the client crashes with a BEX error, then you'll need to disable data execution prevention for the AC client. Database guide:You'll need to install the MySQL ODBC driver. This allows programs to make connections to your database. If you're on Win7 64bit I found I needed to install both the 32bit and 64bit version. Then you'll need to download MySQL (or If you'd prefer a portable MySQL Server) Open a command prompt and cd to the address of the '\bin' folder in your MySQL directory. (Given a typical installation of MySQL 5.1, it would look like the following: "cd c:\MySQL\MySQL Server 5.1\bin"). Now type "MySQL –u root –p". You will be prompted for a password. Enter the password you used to install MySQL. Now you are using the MySQL shell. To create a new database called 'uas2' (as the UAS2 SQL (database) file by default uses a database called 'uas2'), type "CREATE DATABASE uas2;" (be careful to include the semicolon). To populate the database with the data from the UAS2 SQL file, type "SOURCE <file location>", with the location of the uas2.sql file and file name in the brackets. For example, if you (re)named the UAS2 SQL file "uas2.sql" and placed it in the C: directory, type "SOURCE c:\uas2.sql". The data will proceed to be imported into the 'uas2' database. (This was not written by me but only simplified, it was written by drudgedance who has updated the UAS2 last) Enjoy!
|
|
|
UAS2
Nov 6, 2015 20:52:37 GMT
Post by mav on Nov 6, 2015 20:52:37 GMT
This is amazing! I am gonna take a stab at this over the weekend and see if I cant get it running.
One question, the github shows code was last updated 2 years ago, however this post was made just last month, does the github have the latest code?
|
|
|
UAS2
Nov 6, 2015 20:56:41 GMT
Post by mav on Nov 6, 2015 20:56:41 GMT
NEVERMIND, just saw that you just set this up to see if anyone wants to continue working on it. Ill see what I can get running this weekend, feel free to delete these 2 idiotic posts.
|
|
|
UAS2
Dec 16, 2015 12:50:48 GMT
via mobile
Post by M I L F Hunter on Dec 16, 2015 12:50:48 GMT
Hello, I have mainly created this forum for people who are interested in the development of UAS2. As i've noticed the old forum of madoshi has been shut down(?) and i thought i could create a new one for everyone who's interested I will therefore link a page to where you can download the current UAS2 and put some information on how to use and install it below. github.com/drudgedance/UAS2This includes the client, server, and the source code with the latest changes. The client should be able to be run from any location. In order to run the server, you'll need to import the uas2.sql file into a database named "uas2" (I'll add a howto at the bottom of this post for those that need a guide). Run the server executable and connect it to your database. Then you can run the UAS2 Launcher from the client folder to launch the game. Note: If the client crashes with a BEX error, then you'll need to disable data execution prevention for the AC client. Database guide:You'll need to install the MySQL ODBC driver. This allows programs to make connections to your database. If you're on Win7 64bit I found I needed to install both the 32bit and 64bit version. Then you'll need to download MySQL (or If you'd prefer a portable MySQL Server) Open a command prompt and cd to the address of the '\bin' folder in your MySQL directory. (Given a typical installation of MySQL 5.1, it would look like the following: "cd c:\MySQL\MySQL Server 5.1\bin"). Now type "MySQL –u root –p". You will be prompted for a password. Enter the password you used to install MySQL. Now you are using the MySQL shell. To create a new database called 'uas2' (as the UAS2 SQL (database) file by default uses a database called 'uas2'), type "CREATE DATABASE uas2;" (be careful to include the semicolon). To populate the database with the data from the UAS2 SQL file, type "SOURCE <file location>", with the location of the uas2.sql file and file name in the brackets. For example, if you (re)named the UAS2 SQL file "uas2.sql" and placed it in the C: directory, type "SOURCE c:\uas2.sql". The data will proceed to be imported into the 'uas2' database. (This was not written by me but only simplified, it was written by drudgedance who has updated the UAS2 last) Enjoy! This is great, but are you giving it out to everyone to work on?
|
|
|
UAS2
Dec 29, 2015 22:38:09 GMT
Post by Who on Dec 29, 2015 22:38:09 GMT
This is really great!
I wanted to know did anyone find the old Sentinel \ GM UI? That had some cool features like click on anyplace on the map and you would teleport along with a drop down teleport map list. It also had pong for those lonely nights with no players submitting problem reports?
|
|
|
UAS2
Feb 1, 2017 6:00:07 GMT
Post by Nelwyn on Feb 1, 2017 6:00:07 GMT
I don't see the executables in this package. I used this long ago without any issue though.
|
|
|
UAS2
Feb 28, 2017 12:35:07 GMT
Post by gefferz on Feb 28, 2017 12:35:07 GMT
I've had some fun with this code in the past couple of days. The newer emulators use C#, and other stuff which I'm not familiar with. I don't want to take this up in a big way, but rather tinker around with what's already been done. It would be fun to get some kind of gameplay, some kind at all. I think the first thing to ask is, does this really have to run against the old version of the game? It's sort of fun to go back in time and play in the old way. I compiled okay on my old Visual Studio 6.00 - hehe I am old school. I also exported from mysql to microsoft SQL, and that works fine too, at least for local host(I imported into Microsoft SQL, rather than the other way round). I say works fine, the game has a tendency to crash.
Oh, I changed the SQL line in Database.cpp line 75 to sprintf((char*)ConnStrIn, "Driver={SQL Server};Server=(local);UID=%s;PWD=%s;Trusted_Connection=No;Database=%s;", szDBUSER,szDBPASSWORD,szDBNAME); because my microsoft sql didn't like connecting with an IP.
So let me throw a simple code change your way - when you spawn a monster and attack it, there's some kind of a battle that half works, but when you die, you go back to the start point, not the lifestone. So...
CMonster Server.cpp line 338 after SendtoAllInFocus: replace the cWorldManager::TeleportAvatar( pcTargetObj, cMasterServer::m_StartingLoc ); with->
//death by monster should go to lifestone surely, or to start point else if(pcTargetObj->m_pcAvatar->m_LSLoc.m_dwLandBlock > 0x0000FFFF) { cWorldManager::TeleportAvatar( pcTargetObj, pcTargetObj->m_pcAvatar->m_LSLoc ); } else { cWorldManager::TeleportAvatar( pcTargetObj, cMasterServer::m_StartingLoc ); }
There's a similar one which I've not tested in WorldServer.cpp line 585 if(pcTargetObj->m_pcAvatar->m_LSLoc.m_dwLandBlock > 0x0000FFFF) cWorldManager::MoveAvatar( this, pcTargetObj->m_pcAvatar->m_LSLoc, 1 ); else cWorldManager::TeleportAvatar( pcTargetObj, cMasterServer::m_StartingLoc ); I think this is for PK death.
I also tinkered with the spawn monster code, there's a bug there surely line 1741 in CommandParser. // if ( flUserHeading < 0 && flUserHeading > 270 ) // wrong surely 0-360 if ( flUserHeading > 270 ) Well it can't be both less than 0 and > 270 can it?!
I put this in instead anyway: Randx = (((rand() & 32767) * 100) >> 15) + 20; Randy = (((rand() & 32767) * 100) >> 15) + 20; // if ( flUserHeading < 0 && flUserHeading > 270 ) // wrong surely 0-360 if ( flUserHeading > 270 ) { MonsterLoc.m_flX += Randx; MonsterLoc.m_flY += Randy; } else if ( flUserHeading > 0 && flUserHeading < 90 ) { MonsterLoc.m_flX += Randx; MonsterLoc.m_flY -= Randy; } else if ( flUserHeading > 90 && flUserHeading < 180 ) { MonsterLoc.m_flX -= Randy; MonsterLoc.m_flY -= Randy; } else if ( flUserHeading > 180 && flUserHeading < 270 ) { MonsterLoc.m_flX -= Randx; MonsterLoc.m_flY += Randy; } So the monsters spawn at some random distance.
It's pleasing that monsters show up on the radar. Now I'm trying to understand some of these tables. I'd like an easier way to get a weapon. It would be nice too if creatures could autospawn near the player, even if for now they are just randomised.
I am struggling with the code in some respects. I've never coded in this way with inline Statics in the headers, rather than create instances and using pointers. It means you can't properly single step and see what things contain. I looked at changing it all, but it's too complicated for my little brain. Also the database access is so fiddly - Crecordset is so easy. But I suppose will have to make do.
But it's nice to find that there's still an active forum, sort of.
Geoff.
|
|
|
UAS2
Mar 1, 2017 10:11:00 GMT
Post by gefferz on Mar 1, 2017 10:11:00 GMT
Spawning items by number is no fun, so I added this: (copy code to appropriate places)
cItemModels.h file ->static cItemModels *FindModelByName( char* pName);
cItemModels.cpp file->
cItemModels *cItemModels::FindModelByName(char* pName) { //const char* pModelName;
cItemModels *pcModel;
for ( int i = 0; i < ITEM_MODEL_TABLE_SIZE; ++i ) { pcModel = m_lpcHashTable; while ( pcModel ) { if ( pcModel->m_dwModelID ) { if (lstrcmpi(pcModel->m_strName.c_str(), pName) == 0) return pcModel; } pcModel = pcModel->m_pcNext; } } return NULL; }
and CommandParser.cpp
BOOL cCommandParser::SpawnItem(char *szItem ) { cItemModels *pcModel; if ( !lstrlen( szItem ) ) return FormatError( "!SpawnItem" ); char *szStopString; DWORD dwItemModelID = strtoul( szItem, &szStopString, 10 ); if (dwItemModelID == 0) { cMasterServer::ServerMessage( ColorGreen, m_pcClient, "Spawning item %s", szItem); pcModel = cItemModels::FindModelByName(szItem); if (!pcModel) { cMasterServer::ServerMessage( ColorRed, m_pcClient, "can't find item %s", szItem); return FALSE; } dwItemModelID = pcModel->m_dwModelID; } else { cMasterServer::ServerMessage( ColorGreen, m_pcClient, "Spawning item %lu.", dwItemModelID ); //Cubem0j0: We find the model number so we can get some vars. pcModel = cItemModels::FindModel(dwItemModelID); if (!pcModel) { cMasterServer::ServerMessage( ColorRed, m_pcClient, "can't find item %lu", dwItemModelID ); return FALSE; } } switch(pcModel->m_ItemType) { case 0: { tgen->CreateMisc(m_pcClient,dwItemModelID); break; } case 1: { tgen->CreateWeapon(m_pcClient,dwItemModelID,NULL,0); break; } case 2: { tgen->CreateFood(m_pcClient,dwItemModelID,0); break; } case 3: { tgen->CreateArmor(m_pcClient,dwItemModelID); break; } case 4: { tgen->CreateBook(m_pcClient,dwItemModelID,NULL); break; } case 5: { tgen->CreateScrolls(m_pcClient,dwItemModelID); break; } case 6: { tgen->CreateHealingKit(m_pcClient,dwItemModelID); break; } case 7: { tgen->CreateLockpicks(m_pcClient,dwItemModelID); break; } case 8: { tgen->CreateWand(m_pcClient,dwItemModelID,NULL); break; } case 9: { tgen->CreatePyreals(m_pcClient,dwItemModelID, DWORD(0x03),WORD(0x0003)); break; } case 10: { tgen->CreateManastone(m_pcClient,dwItemModelID); break; } case 11: { tgen->CreateAmmo(m_pcClient,dwItemModelID); break; } case 12: { tgen->CreateShield(m_pcClient,dwItemModelID); break; } case 13: { tgen->CreateSpellComponents(m_pcClient,dwItemModelID,NULL); break; } case 14: { tgen->CreateGem(m_pcClient,dwItemModelID,NULL); break; } case 15: { tgen->CreateTradeNotes(m_pcClient,dwItemModelID); break; } case 16: { tgen->CreateTradeSkillMats(m_pcClient,dwItemModelID); break; } case 17: { tgen->CreatePlants(m_pcClient,dwItemModelID); break; } case 18: { tgen->CreateClothes(m_pcClient,dwItemModelID); break; } case 19: { tgen->CreateJewelry(m_pcClient,dwItemModelID); break; } case 20: { tgen->CreatePack(m_pcClient,dwItemModelID); break; } case 21: { tgen->CreateSalvage(m_pcClient,dwItemModelID); break; } case 22: { tgen->CreateFoci(m_pcClient,dwItemModelID); break; } default: cMasterServer::ServerMessage( ColorRed, m_pcClient, "type not covered %d", pcModel->m_ItemType); } return TRUE; }
Not sure why the monster animation when attacking is just a random one, and not a sequence. Seems to look better as a sequence.. so added ->
Added to Object.h (cmonster) int m_CurrentAnim; m_CurrentAnim = 0; (monster.cpp cMonster constructor)
Cmonsterserver.cpp about line 238 -- changed to case 0x5: // Attack user { DWORD dwDamageType = 0x4; float flDamageSlider = rand() % 2; float intRange;
//int AttackAnim = iRand/1000; AttackAnim = pcMonster->m_CurrentAnim; pcMonster->m_CurrentAnim++; if (pcMonster->m_CurrentAnim > 5) pcMonster->m_CurrentAnim = 0;
I want to know now why: 1) Monsters don't attack unless you attack first. They do, and follow you now. 2) Player animations don't animate in attacking 3) Objects aren't always persisted in inventory. I can see the code that does it, and it works for say milk and bread - simple objects. There was code missing for shield spawns, but my fix didn't work. 4) Some weapons spawn and can be picked up, some even look correct. Some can't be picked up, some look wrong. So Nekode looks good and works, but cestus shows as a club. 5) Death is instant, does not always go to lifestone (with my changed code), but mostly does. I think just a delay before lifestone would work better. 6) Can't sound effects work when attacking, or under attack? 7) Armour can be generated and worn, and shows in inventory. It does not show in the players appearance in the world though.
|
|
|
UAS2
Jan 8, 2018 21:26:13 GMT
Post by Blood-Lust on Jan 8, 2018 21:26:13 GMT
I would play the shit out of a AC DT vanilla server with no macroing no exp chains no decal just good old grinding for your life, i want to be fighting off other lvl 10's for a farming spot at the lugians by qbar!
|
|
|
UAS2
Mar 20, 2019 0:28:54 GMT
Post by Ellsymn on Mar 20, 2019 0:28:54 GMT
Amoxicilina In Internet <a href=http://uscagsa.com>cheapest cialis 20mg</a> Zithromax Weight Gain
|
|
|
UAS2
May 18, 2019 10:20:31 GMT
Post by Michaelweibe on May 18, 2019 10:20:31 GMT
standings thumbnails humanitarian <a href=https://myheadlinks.cf/p795.html>corporate establish </a> vegetation confident enclosure annotation
|
|
|
UAS2
Nov 14, 2021 17:05:20 GMT
Post by buy cialis usa on Nov 14, 2021 17:05:20 GMT
cheap cialis <a href="https://cialiswithdapoxetine.com/#">cialis tablets</a>
|
|
|
UAS2
Nov 17, 2021 20:40:23 GMT
Post by buy cialis usa on Nov 17, 2021 20:40:23 GMT
|
|
|
UAS2
Nov 21, 2021 16:18:11 GMT
Post by cialis support 365 on Nov 21, 2021 16:18:11 GMT
<a href="https://cialiswithdapoxetine.com/#">cialis pills</a> cialis coupon
|
|
|
UAS2
Nov 28, 2021 15:20:09 GMT
Post by cialis online on Nov 28, 2021 15:20:09 GMT
|
|